- 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
-
Define your dataloaders, models, runners, scripts in corresponding directories.
- Each file in
models
dir should implementget_args
,get_net
,get_native_transform
functions. - ...
Use
classification.py
dataloader/runner as an example andresnet_classification.py
as an example of a model. - Each file in
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.
- Prepare your dataset to have this structure:
dataset
├── class1
├── class2
└── class3
Images for each class in a corresponding folder.
- 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.
- Learn something
python train.py --extension my_classification --config_name classification