release commit
authorManu Mathew <a0393608@ti.com>
Tue, 7 Jan 2020 11:43:05 +0000 (17:13 +0530)
committerManu Mathew <a0393608@ti.com>
Tue, 7 Jan 2020 11:43:05 +0000 (17:13 +0530)
docs/Semantic_Segmentation.md
scripts/train_classification_main.py
scripts/train_depth_main.py
scripts/train_segmentation_main.py

index 997a22a5f438b7da167e261cd493d217a1785a32..a59781351333b2e3c2934a438dde65f9b9f8ab78 100644 (file)
@@ -83,7 +83,7 @@ Inference can be done as follows (fill in the path to the pretrained model):<br>
 |---------  |----------                |-----------   |-------------- |-----------|--------             |----------|----------------------------------------    |
 |Cityscapes |FPNPixel2Pixel with DWASPP|MobileNetV2   |64             |768x384    |0.99                 |62.43     |fpn_pixel2pixel_aspp_mobilenetv2_tv_fd    |
 |Cityscapes |DeepLabV3Lite with DWASPP |MobileNetV2   |16             |768x384    |**3.54**             |**69.13** |**deeplabv3lite_mobilenetv2_tv**            |
-|Cityscapes |FPNPixel2Pixel            |MobileNetV2   |32(\*2\*2)     |768x384    |3.66                 |70.28     |fpn_pixel2pixel_mobilenetv2_tv              |
+|Cityscapes |FPNPixel2Pixel            |MobileNetV2   |32(\*2\*2)     |768x384    |3.66                 |70.30     |fpn_pixel2pixel_mobilenetv2_tv              |
 |Cityscapes |FPNPixel2Pixel with DWASPP|MobileNetV2   |32             |768x384    |3.84                 |70.39     |fpn_pixel2pixel_aspp_mobilenetv2_tv         |
 |Cityscapes |FPNPixel2Pixel            |MobileNetV2   |64(\*2\*2)     |1536x768   |3.85                 |69.82     |fpn_pixel2pixel_mobilenetv2_tv_fd         |
 |Cityscapes |FPNPixel2Pixel with DWASPP|MobileNetV2   |64             |1536x768   |**3.96**             |**71.28** |**fpn_pixel2pixel_aspp_mobilenetv2_tv_fd**|
index 2887be1eda02844a6cc924d6b1a9a40694289380..7b1964b73c2d8e8955f2c68cfb5cdec8ff22ebe6 100755 (executable)
@@ -158,8 +158,11 @@ if 'training' in args.phase and (not args.quantize):
     args.pretrained = os.path.join(save_path, 'model_best.pth.tar')
     args.phase = 'training_quantize'
     args.quantize = True
-    args.epochs = 25
     args.lr = 5e-5
+    args.epochs = min(args.epochs,25)
+    # quantized training will use only one GPU in the engine - so reduce the batch_size
+    num_gpus = len(str(os.environ["CUDA_VISIBLE_DEVICES"]).split(','))
+    args.batch_size = args.batch_size//num_gpus
     train_classification.main(args)
 #
 
index 286c084f56eb8a73e543c15f03a2b2c9a81c9bb7..c5e7ee05bcc37db8b9ab9bbf782f4640fd18ebcd 100755 (executable)
@@ -149,8 +149,11 @@ if 'training'in args.phase and (not args.quantize):
     args.pretrained = os.path.join(save_path, 'model_best.pth.tar')
     args.phase = 'training_quantize'
     args.quantize = True
-    args.epochs = 25
     args.lr = 5e-5
+    args.epochs = min(args.epochs,25)
+    # quantized training will use only one GPU in the engine - so reduce the batch_size
+    num_gpus = len(str(os.environ["CUDA_VISIBLE_DEVICES"]).split(','))
+    args.batch_size = args.batch_size//num_gpus
     train_pixel2pixel.main(args)
 #
 
index e2297a30d771b48136df5f6887688ea39774ede9..e7d884e41216200d25e80d037dcfe23f291e12bb 100755 (executable)
@@ -143,19 +143,22 @@ for key in vars(cmds):
 train_pixel2pixel.main(args)
 
 ################################
-# In addition run a quantized calibration, starting from the trained model
+# In addition run a quantization aware training, starting from the trained model
 if 'training' in args.phase and (not args.quantize):
     save_path = train_pixel2pixel.get_save_path(args)
     args.pretrained = os.path.join(save_path, 'model_best.pth.tar')
     args.phase = 'training_quantize'
     args.quantize = True
-    args.epochs = 25
     args.lr = 5e-5
+    args.epochs = min(args.epochs,25)
+    # quantized training will use only one GPU in the engine - so reduce the batch_size
+    num_gpus = len(str(os.environ["CUDA_VISIBLE_DEVICES"]).split(','))
+    args.batch_size = args.batch_size//num_gpus
     train_pixel2pixel.main(args)
 #
 
 ################################
-# In addition run a separate validation, starting from the calibrated model - to estimate the quantized accuracy accurately
+# In addition run a separate validation
 if 'training' in args.phase or 'calibration' in args.phase:
     save_path = train_pixel2pixel.get_save_path(args)
     args.pretrained = os.path.join(save_path, 'model_best.pth.tar')