Skip to content

mvkolos/recognition

 
 

Repository files navigation

A general pipeline

  1. Create a new extension for your project.
bash scripts/add_extension.sh my_extension

This creates a following folder structure:

extensions/my_extension/
├── dataloaders
├── models
├── runners
├── scripts
└── config.yaml
  1. Define your dataloaders, models, runners, scripts in corresponding directories.

    • Each file in models dir should implement get_args, get_net, get_native_transform functions.
    • ...

    Use classification.py dataloader/runner as an example and resnet_classification.py as an example of a model.

Classification

Classification works out of the box, runner, dataloader are already implemented there. However, for clarity, you need to create an extension first.

bash scripts/add_extension.sh my_classification

Here is an easy way to solve a classification problem.

  1. Prepare your dataset to have this structure:
dataset
├── class1
├── class2
└── class3

Images for each class in a corresponding folder.

  1. Run this script to gather images and split into train and validation.
python scripts/train_test_split.py --classes_dir path/to/dataset --save_dir extensions/my_extension/data/splits --test_size 0.
  1. Learn something
python train.py --extension my_classification --config_name classification 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 79.1%
  • Python 20.2%
  • Other 0.7%