GithubHelp home page GithubHelp logo

solved1 / greyclassifier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kayoyin/greyclassifier

0.0 0.0 0.0 51.63 MB

CS_IOC5008 Visual Recognition using Deep Learning: Image Classification for grey natural scene images with <4000 annotated data

Home Page: https://towardsdatascience.com/latest-winning-techniques-for-kaggle-image-classification-with-limited-data-5259e7736327

Shell 1.29% Python 98.71%

greyclassifier's Introduction

GreyClassifier

This repository gathers the code for greyscale natural image classification from the in-class Kaggle challenge.

Getting started

First, create a new virtual environment

virtualenv venv -p python3
source venv/bin/activate

You might need to make sure your python3 link is ready by typing

which python3

Then install the development requirements

pip install -r requirements.txt

Install pretrained weights

sh install_tools.sh

Training the base classifiers

Training configuration can be specified in src/configs.py. To train a model for a specific subclass, simply uncomment the desired SUBCLASS in this file and change LOGGER to rooms, nature or urban.

If you would like to train on single-channel images, you can set GREY = True.

Then, run:

python -m src.run

This will train the CNN model on the training and validation sets, then generate and save the concatenated outputs of the snapshot models in xgbdata.

Training the XGB meta-learners

Make sure that LOGGER in src/configs.py is set to the same one you used to train your base classifier, and that TRAIN = True

Run:

python -m src.ensemble

This will train and save the XGBoost model weights.

Ensemble prediction

First, set TRAIN = False in src/configs.py.

Run:

python -m src.ensemble

This will save the testing predictions under xgb.csv.

Future work:

  • Add argument parsing so that the user does not have to edit the configuration file for each different run, and parameters can be passed as arguments instead

greyclassifier's People

Contributors

kayoyin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.