]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/pytorch-jacinto-ai-devkit.git/blobdiff - run_classification.sh
cleanedup STE for QAT. Added RegNetX models
[jacinto-ai/pytorch-jacinto-ai-devkit.git] / run_classification.sh
index 782fe1cd9a0c06203573f6f01bd9770e4c7262ba..3315d85accc649f5f6c8da00465b693b3bd24644 100755 (executable)
 #### For the datasets in sections marked as "Automatic Download", dataset will be downloaded automatically downloaded before training begins. For "Manual Download", it is expected that it is manually downloaded and kept in the folder specified agaianst the --data_path option.
 
 ## =====================================================================================
-## Training
+## Cifar Training (Dataset will be automatically downloaded)
 ## =====================================================================================
 ## Cifar100 Classification (Automatic Download)
 #### Training with MobileNetV2
-#python ./scripts/train_classification_main.py --dataset_name cifar100_classification --model_name mobilenetv2_tv_x1 --data_path ./data/datasets/cifar100_classification --img_resize 32 --img_crop 32 --rand_scale 0.5 1.0 --strides 1 1 1 2 2
+#python ./scripts/train_classification_main.py --dataset_name cifar100_classification --model_name mobilenetv2_tv_x1
+#--data_path ./data/datasets/cifar100_classification --img_resize 32 --img_crop 32 --rand_scale 0.5 1.0 --strides 1 1 1 2 2
 
 ## Cifar10 Classification (Automatic Download)
 #### Training with MobileNetV2
-#python ./scripts/train_classification_main.py --dataset_name cifar10_classification --model_name mobilenetv2_tv_x1 --data_path ./data/datasets/cifar10_classification --img_resize 32 --img_crop 32 --rand_scale 0.5 1.0 --strides 1 1 1 2 2
+#python ./scripts/train_classification_main.py --dataset_name cifar10_classification --model_name mobilenetv2_tv_x1
+#--data_path ./data/datasets/cifar10_classification --img_resize 32 --img_crop 32 --rand_scale 0.5 1.0 --strides 1 1 1 2 2
 
-## ImageNet Classification (Automatic Download)
-#### Training with MobileNetV2
-#python ./scripts/train_classification_main.py --dataset_name imagenet_classification --model_name mobilenetv2_tv_x1 --data_path ./data/datasets/imagenet_classification
 
-## ImageNet Classification (Manual Download)
+## =====================================================================================
+## ImageNet Training (Assuming ImageNet data is already Manually Downloaded)
+## =====================================================================================
+#MobileNetV2 based Models
+#------------------------
 #### Training with MobileNetV2
-#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name mobilenetv2_tv_x1 --data_path ./data/datasets/image_folder_classification
+#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name mobilenetv2_tv_x1
+#--data_path ./data/datasets/image_folder_classification
+
 #### Training with MobileNetV2 - Small Resolution
-#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name mobilenetv2_tv_x1 --data_path ./data/datasets/image_folder_classification --img_resize 146 --img_crop 128 --batch_size 1024 --lr 0.2 --workers 16
+#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name mobilenetv2_tv_x1
+#--data_path ./data/datasets/image_folder_classification --img_resize 146 --img_crop 128 --batch_size 1024 --lr 0.2 --workers 16
+
 #### Training with MobileNetV2 with 2x channels and expansion factor of 2
-#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name mobilenetv2_tv_x2_t2 --data_path ./data/datasets/image_folder_classification --batch_size 256
+#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name mobilenetv2_tv_x2_t2
+#--data_path ./data/datasets/image_folder_classification --batch_size 256
+
 
+#ResNet50 based Models
+#------------------------
 ### Training with ResNet50
-#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name resnet50_x1 --data_path ./data/datasets/image_folder_classification
+#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name resnet50_x1
+#--data_path ./data/datasets/image_folder_classification
+
 ### Training with ResNet50 - with half the number of channels - so roughly 1/4 the complexity
-#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name resnet50_xp5 --data_path ./data/datasets/image_folder_classification
+#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name resnet50_xp5
+#--data_path ./data/datasets/image_folder_classification
+
+
+#RegNetX based Models
+#------------------------
+### Training with ResgNetX800MF with BGR input
+#Note: to use BGR input, set: --input_channel_reverse True, for RGB input ommit this argument or set it to False.
+#python ./scripts/train_classification_main.py --dataset_name image_folder_classification --model_name regnetx800mf_x1
+#--data_path ./data/datasets/image_folder_classification \
+#--input_channel_reverse True --image_mean 103.53 116.28 123.675 --image_scale 0.017429 0.017507 0.017125
+
 
 ## =====================================================================================
 ## Validation
 ## =====================================================================================
 #### cifar100 Validation - populate the pretrained model path below in ??
-#python ./scripts/train_classification_main.py --phase validation --dataset_name cifar100_classification --model_name mobilenetv2_tv_x1 --data_path ./data/datasets/cifar100_classification --img_resize 32 --img_crop 32 \
+#python ./scripts/train_classification_main.py --phase validation --dataset_name cifar100_classification --model_name mobilenetv2_tv_x1
+#--data_path ./data/datasets/cifar100_classification --img_resize 32 --img_crop 32 \
 #--pretrained=???
 
 #### cifar10 Validation - populate the pretrained model path below in ??
-#python ./scripts/train_classification_main.py --phase validation --dataset_name cifar10_classification --model_name mobilenetv2_tv_x1 --data_path ./data/datasets/cifar10_classification --img_resize 32 --img_crop 32 \
+#python ./scripts/train_classification_main.py --phase validation --dataset_name cifar10_classification --model_name mobilenetv2_tv_x1
+#--data_path ./data/datasets/cifar10_classification --img_resize 32 --img_crop 32 \
 #--pretrained=???
 
-#### Validation - populate the pretrained model path below in ?? or use https://download.pytorch.org/models/resnet50-19c8e357.pth for resnet50_x1
-#python ./scripts/train_classification_main.py --phase validation --dataset_name image_folder_classification --model_name resnet50_x1 --data_path ./data/datasets/image_folder_classification \
-#--pretrained https://download.pytorch.org/models/resnet50-19c8e357.pth
 
-#### Validation - populate the pretrained model path below in ?? or use https://download.pytorch.org/models/mobilenet_v2-b0353104.pth for mobilenetv2_tv_x1
-#python ./scripts/train_classification_main.py --phase validation --dataset_name image_folder_classification --model_name mobilenetv2_tv_x1 --data_path ./data/datasets/image_folder_classification \
+#MobileNetV2 based Models
+#------------------------
+#### Validation - ImageNet - populate the pretrained model path below in ?? or use https://download.pytorch.org/models/mobilenet_v2-b0353104.pth for mobilenetv2_tv_x1
+#python ./scripts/train_classification_main.py --phase validation --dataset_name image_folder_classification --model_name mobilenetv2_tv_x1
+#--data_path ./data/datasets/image_folder_classification \
 #--pretrained https://download.pytorch.org/models/mobilenet_v2-b0353104.pth
 
-#### Validation - populate the pretrained model path below in ?? for resnet50_xp5
-#python ./scripts/train_classification_main.py --phase validation --dataset_name image_folder_classification --model_name resnet50_xp5 --data_path ./data/datasets/image_folder_classification \
+#### Validation - ImageNet - populate the pretrained model path below in ?? or use https://download.pytorch.org/models/resnet50-19c8e357.pth for resnet50_x1
+#python ./scripts/train_classification_main.py --phase validation --dataset_name image_folder_classification --model_name resnet50_x1
+#--data_path ./data/datasets/image_folder_classification \
+#--pretrained https://download.pytorch.org/models/resnet50-19c8e357.pth
+
+
+#ResNet50 based Models
+#------------------------
+#### Validation - ImageNet - populate the pretrained model path below in ?? for resnet50_xp5
+#python ./scripts/train_classification_main.py --phase validation --dataset_name image_folder_classification --model_name resnet50_xp5
+#--data_path ./data/datasets/image_folder_classification \
 #--pretrained ./data/modelzoo/pytorch/image_classification/imagenet1k/jacinto_ai/resnet50-0.5_2018-07-23_12-10-23.pth
+
+
+#RegNetX based Models
+#------------------------
+#### Validation - ImageNet regnetx800mf_x1 with BGR input
+#Note: to use BGR input, set: --input_channel_reverse True, for RGB input ommit this argument or set it to False.
+#python ./scripts/train_classification_main.py --phase validation --dataset_name image_folder_classification --model_name resnet50_x1
+#--data_path ./data/datasets/image_folder_classification \
+#--input_channel_reverse True --image_mean 103.53 116.28 123.675 --image_scale 0.017429 0.017507 0.017125 --model_name regnetx800mf_x1 \
+#--pretrained https://dl.fbaipublicfiles.com/pycls/dds_baselines/160906036/RegNetX-800MF_dds_8gpu.pyth
+
+
+
+## =====================================================================================
+#Training with ImageNet data download - download may take too much time - we have not tested this.
+## =====================================================================================
+#### Training with MobileNetV2
+#python ./scripts/train_classification_main.py --dataset_name imagenet_classification --model_name mobilenetv2_tv_x1
+#--data_path ./data/datasets/imagenet_classification