Week 4
March 03/20/23
Plan on the Edge gateway front
- Compare model sizes, resnet18, resnet34, resnet50, resnet101 and resnet152 and MobileNet
- On a sample dataset, train models with these different backbones
- Load these models on a Raspberry-pi, and note down inference times (prediction)
- Use techniques prescribed in Knowledge Distillation to reduce the size of the these trained models
- Load these models on a Raspberry-pi again, and note down inference times (prediction)
Alternate approach
- Train models on the MobileNetV2, MobileNetV3 backbone
- Load these models on a Raspberry-pi, and note down inference times (prediction)
- Compare performance difference between the two runs
New models to train ahead
- A model trained on the concatenation of all the PACP standard datasets, which would be DNV, COV and SD1
- Train the model in the same way we trained our previous models.
- A single 10-fold cross validation run.
- Other runs with/without image augmentation, weighted loss function and training from scratch.
Ideas for refactor
- Use of
typerorclickto eventually break down bigger main functions into smaller, modular, resusable functions - Do not put all the logic in the main function
March 03/24/23
What should a run-id look like?
Borrowing the discussion from Jake's email on how to name a GitHub repository.
info
TLDR; a repository (in broader terms a project) should be named as follows,
- [product/project name]-[purpose]-[framework/language] e.g. myproject-api-rails
- [product/project name]-[purpose] e.g. myproject-rest-api
- [language/framework]-[product/project] e.g. python-security-scripts
There are a lot of parameters to be considered while writing a run-id for wandb. Paramters like dataset, backbone, training parameters, epochs, utility all need to be considered.
- Dataset
- utility
- number of videos
- Continuous labelling?
- Backbone
- Pretrained?
- Training method? Freeze epochs? fit_one_cycle, fit_flat_cos?
- Epochs
- Image transforms?
A sample run id in such a case would look like this,
- dnv-86-C-resnet50-prT-10
- dnv-86-C-resnet50-prT-10-resize-flip-rotate-etc
- sd1-119-C-mobilnetv3large-prF-10
Delete models with incorrect WandbCallback
- Make a list of those models
- Delete them GDrive
- Delete from Vannary's local drive
- Delete from Deven's local drive
Renaming the projects

Projects are being renamed to the following
- cctv-sd1-multilabel
- cctv-sd1-binary
- cctv-dnv-multilabel
- cctv-dnv-binary
- cctv-cov-multilabel
- cctv-cov-binary
- test-runs (for testing wandb connection, multi-gpu runs, etc)
Documenting the current run-id standard
For cv_dnv486_multigpus_23_10_continuous_train_val_486_videos_from_80_20_split_v3_3_2023/03/23_07:31
- run id: cv_dnv486_multigpus_23_10
- cv: cross validation
- dnv486: DNV utility 486 videos
- multigpus: run on multiple gpus
- 23: (indexed from 0) 24th csv file which has a 80(75-25 train/val) - 20(test) split for the entire dataset
- 10: → trained with
fine_tunewith freeze epochs 10 and 10 epochs
- name of the csv file: continuous_train_val_486_videos_from_80_20_split_v3_3
- time at which the execution began: 2023/03/23_07:31
Ideas for the continuously learning model
I'm not sure, how I should set this entire training pipeline up. I had 2 main thoughts on this,
- While creating the first model which would start training, have it include all the 300 classes instead of the only available 45. Not sure if this will hamper performance as such?
- Train the model with available 45 classes for now, in the future, when I have new class to identify, update the model accordingly and train the model again.
I've asked this question on multiple discord servers to see if I can get any input on this.