Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 1.61 KB

File metadata and controls

27 lines (20 loc) · 1.61 KB

Objective

To have a master codebase to train, infer and evaluate classifiers

!!!! IMPORTANT !!!!

This repo requires data in given format:-

  1. Image folder containing whole images that are to be used for training
  2. Train CSV that MUST have following columns:- a. image_name (CAN BE CHANGED BUT HAS TO BE UPDATED IN CONFIG FILE) b. xmin (MUST BE OF GIVEN NAME) c. ymin (MUST BE OF GIVEN NAME) d. xmax (MUST BE OF GIVEN NAME) e. ymax (MUST BE OF GIVEN NAME) f. class (MUST BE OF GIVEN NAME)

This repo is completely dependent on a config.yaml to train, allowing for dynamic hyperparameter tuning, without the need to change the original training code. However, if need arise we can easily add code to update architecture of our model. To get basic idea of how this repo works, you can refer to training_flow.jpg image.

After making sure your data is in above format you should do the following steps:-

  1. Create docker image with command-> sudo docker build -f dockerfile/Dockerfile -t classifier_image .
  2. Create docker container using -> sudo docker run -it --name cls_container -v ~/classifier:/classifier --gpus '"device=0,1,2,3"' -u $(id -u):$(id -g) --shm-size 160G classifier_image
  3. You will be shown a new terminal, this is the terminal of docker container
  4. Now you can simply run ./autotrain.sh and training process will start

Once container is created training process will start automatically. Make sure all data is already prepped before starting training

You can get last epoch trained model and best model from models/checkpoints/ folder