├── Docs ├── banner.jpg └── nvidia_model_workflow_green.jpg ├── Readme.md ├── SMCHYD_TLT_DEMO.ipynb ├── dataset └── download_dataset.txt ├── exported_model ├── labels.txt ├── primary_inference.txt └── stream_config.txt ├── pretrained_model └── ignore.txt ├── pruned_model └── ignore.txt ├── retrained_model └── ignore.txt ├── scripts └── ignore.txt ├── spec_files ├── convert.txt ├── infer.txt ├── retrain.txt └── train.txt ├── tf_records └── ignore.txt └── trained_model └── ignore.txt /Docs/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitin-smc/Transfer-Learning-Toolkit-A-Comprehensive-Guide/e4e6496898a491b73ad5576979ad09e6642ddb97/Docs/banner.jpg -------------------------------------------------------------------------------- /Docs/nvidia_model_workflow_green.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitin-smc/Transfer-Learning-Toolkit-A-Comprehensive-Guide/e4e6496898a491b73ad5576979ad09e6642ddb97/Docs/nvidia_model_workflow_green.jpg -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | ![](Docs/banner.jpg) 2 | 3 | # Nvidia Transfer Learning Toolkit — A Comprehensive Guide 4 | 5 | In today’s world, most of the highly optimised Deep Neural Networks architecture is already available to use and what makes it more impressive is the ability to train only the last few layers of a pre-trained model to achieve superhuman accuracy in very less time. 6 | 7 | ![](Docs/nvidia_model_workflow_green.jpg) 8 | 9 | In this article, we are going to train a model on publically available KITTI Dataset, using NVIDIA Transfer Learning Toolkit (TLT) and deploy it to Jetson Nano. 10 | 11 | The full article is posted on Medium blog [Read more...](https://medium.com/@Smartcow_ai/nvidia-transfer-learning-toolkit-a-comprehensive-guide-75148d1ac1b) 12 | 13 | -------------------------------------------------------------------------------- /dataset/download_dataset.txt: -------------------------------------------------------------------------------- 1 | download kitti dataset from: 2 | https://www.kaggle.com/twaldo/kitti-object-detection/data 3 | -------------------------------------------------------------------------------- /exported_model/labels.txt: -------------------------------------------------------------------------------- 1 | car 2 | cyclist 3 | pedestrian -------------------------------------------------------------------------------- /exported_model/primary_inference.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2018 NVIDIA Corporation. All rights reserved. 2 | # 3 | # NVIDIA Corporation and its licensors retain all intellectual property 4 | # and proprietary rights in and to this software, related documentation 5 | # and any modifications thereto. Any use, reproduction, disclosure or 6 | # distribution of this software and related documentation without an express 7 | # license agreement from NVIDIA Corporation is strictly prohibited. 8 | 9 | # Following properties are mandatory when engine files are not specified: 10 | # int8-calib-file(Only in INT8) 11 | # Caffemodel mandatory properties: model-file, proto-file, output-blob-names 12 | # UFF: uff-file, input-dims, uff-input-blob-name, output-blob-names 13 | # ONNX: onnx-file 14 | # 15 | # Mandatory properties for detectors: 16 | # num-detected-classes 17 | # 18 | # Optional properties for detectors: 19 | # enable-dbscan(Default=false), interval(Primary mode only, Default=0) 20 | # custom-lib-path, 21 | # parse-bbox-func-name 22 | # 23 | # Mandatory properties for classifiers: 24 | # classifier-threshold, is-classifier 25 | # 26 | # Optional properties for classifiers: 27 | # classifier-async-mode(Secondary mode only, Default=false) 28 | # 29 | # Optional properties in secondary mode: 30 | # operate-on-gie-id(Default=0), operate-on-class-ids(Defaults to all classes), 31 | # input-object-min-width, input-object-min-height, input-object-max-width, 32 | # input-object-max-height 33 | # 34 | # Following properties are always recommended: 35 | # batch-size(Default=1) 36 | # 37 | # Other optional properties: 38 | # net-scale-factor(Default=1), network-mode(Default=0 i.e FP32), 39 | # model-color-format(Default=0 i.e. RGB) model-engine-file, labelfile-path, 40 | # mean-file, gie-unique-id(Default=0), offsets, gie-mode (Default=1 i.e. primary), 41 | # custom-lib-path, network-mode(Default=0 i.e FP32) 42 | # 43 | # The values in the config file are overridden by values set through GObject 44 | # properties. 45 | 46 | [property] 47 | gpu-id=0 48 | net-scale-factor=0.0039215697906911373 49 | model-engine-file=INT8_m1.plan 50 | labelfile-path=labels.txt 51 | int8-calib-file=calibration.bin 52 | uff-input-blob-name=input_1 53 | batch-size=1 54 | input-dims=3;128;512;0 55 | process-mode=1 56 | model-color-format=0 57 | ## 0=FP32, 1=INT8, 2=FP16 mode 58 | network-mode=1 59 | num-detected-classes=3 60 | interval=0 61 | gie-unique-id=1 62 | output-blob-names=output_cov/Sigmoid;output_bbox/BiasAdd 63 | is-classifier=0 64 | 65 | [class-attrs-all] 66 | threshold=0.1 67 | group-threshold=1 68 | ## Set eps=0.7 and minBoxes for enable-dbscan=1 69 | eps=0.2 70 | minBoxes=5 71 | roi-top-offset=0 72 | roi-bottom-offset=0 73 | detected-min-w=0 74 | detected-min-h=0 75 | detected-max-w=0 76 | detected-max-h=0 77 | 78 | ## Per class configuration 79 | #[class-attrs-2] 80 | #threshold=0.6 81 | #eps=0.5 82 | #group-threshold=3 83 | #roi-top-offset=20 84 | #roi-bottom-offset=10 85 | #detected-min-w=40 86 | #detected-min-h=40 87 | #detected-max-w=400 88 | #detected-max-h=800 89 | -------------------------------------------------------------------------------- /exported_model/stream_config.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2018 NVIDIA Corporation. All rights reserved. 2 | # 3 | # NVIDIA Corporation and its licensors retain all intellectual property 4 | # and proprietary rights in and to this software, related documentation 5 | # and any modifications thereto. Any use, reproduction, disclosure or 6 | # distribution of this software and related documentation without an express 7 | # license agreement from NVIDIA Corporation is strictly prohibited. 8 | 9 | [application] 10 | enable-perf-measurement=1 11 | perf-measurement-interval-sec=5 12 | #gie-kitti-output-dir=streamscl 13 | 14 | [tiled-display] 15 | enable=1 16 | rows=1 17 | columns=1 18 | width=1920 19 | height=1080 20 | 21 | [source0] 22 | enable=1 23 | #Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP 24 | type=3 25 | uri=file:///home/nano/TLT_DEMO/ds_configs/smc_test_video_1080p.mp4 26 | num-sources=1 27 | #drop-frame-interval=2 28 | gpu-id=0 29 | # (0): memtype_device - Memory type Devqice 30 | # (1): memtype_pinned - Memory type Host Pinned 31 | # (2): memtype_unified - Memory type Unified 32 | cudadec-memtype=0 33 | 34 | [sink0] 35 | enable=1 36 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 37 | type=5 38 | sync=0 39 | display-id=0 40 | offset-x=0 41 | offset-y=0 42 | width=0 43 | height=0 44 | overlay-id=1 45 | source-id=0 46 | 47 | [sink1] 48 | enable=0 49 | type=3 50 | #1=mp4 2=mkv 51 | container=1 52 | #1=h264 2=h265 3=mpeg4 53 | codec=1 54 | sync=0 55 | bitrate=2000000 56 | output-file=out.mp4 57 | source-id=0 58 | 59 | [sink2] 60 | enable=0 61 | #Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=Overlay 62 | type=4 63 | #1=h264 2=h265 64 | codec=1 65 | sync=0 66 | bitrate=4000000 67 | # set below properties in case of RTSPStreaming 68 | rtsp-port=8554 69 | udp-port=5400 70 | 71 | [osd] 72 | enable=1 73 | border-width=2 74 | text-size=12 75 | text-color=1;1;1;1; 76 | text-bg-color=0.3;0.3;0.3;1 77 | font=Serif 78 | show-clock=0 79 | clock-x-offset=800 80 | clock-y-offset=820 81 | clock-text-size=12 82 | clock-color=1;0;0;0 83 | 84 | [streammux] 85 | ##Boolean property to inform muxer that sources are live 86 | live-source=0 87 | batch-size=1 88 | ##time out in usec, to wait after the first buffer is available 89 | ##to push the batch even if the complete batch is not formed 90 | batched-push-timeout=40000 91 | ## Set muxer output width and height 92 | width=1920 93 | height=1080 94 | 95 | # config-file property is mandatory for any gie section. 96 | # Other properties are optional and if set will override the properties set in 97 | # the infer config file. 98 | [primary-gie] 99 | enable=1 100 | model-engine-file=INT8_m1.plan 101 | batch-size=1 102 | #Required by the app for OSD, not a plugin property 103 | bbox-border-color0=1;0;0;1 104 | bbox-border-color1=0;1;1;1 105 | interval=10 106 | #Required by the app for SGIE, when used along with config-file property 107 | gie-unique-id=1 108 | config-file=primary_inference.txt 109 | 110 | [tests] 111 | file-loop=1 112 | 113 | [tracker] 114 | enable=1 115 | tracker-width=512 116 | tracker-height=128 117 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_iou.so 118 | #ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_nvdcf.so 119 | ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_klt.so 120 | #ll-config-file required for DCF/IOU only 121 | #ll-config-file=tracker_config.yml 122 | #ll-config-file=iou_config.txt 123 | gpu-id=0 124 | #enable-batch-process applicable to DCF only 125 | enable-batch-process=1 126 | -------------------------------------------------------------------------------- /pretrained_model/ignore.txt: -------------------------------------------------------------------------------- 1 | please ignore this file 2 | -------------------------------------------------------------------------------- /pruned_model/ignore.txt: -------------------------------------------------------------------------------- 1 | please ignore this file 2 | -------------------------------------------------------------------------------- /retrained_model/ignore.txt: -------------------------------------------------------------------------------- 1 | please ignore this file 2 | -------------------------------------------------------------------------------- /scripts/ignore.txt: -------------------------------------------------------------------------------- 1 | please ignore this file 2 | -------------------------------------------------------------------------------- /spec_files/convert.txt: -------------------------------------------------------------------------------- 1 | kitti_config { 2 | root_directory_path: "/workspace/dataset/KITTI_original/training" 3 | image_dir_name: "image_2_resized" 4 | label_dir_name: "label_2_resized" 5 | image_extension: ".jpg" 6 | partition_mode: "random" 7 | num_partitions:2 8 | val_split: 15 9 | num_shards: 10 10 | } 11 | image_directory_path: "/workspace/dataset/KITTI_original/training" 12 | -------------------------------------------------------------------------------- /spec_files/infer.txt: -------------------------------------------------------------------------------- 1 | { 2 | "dbscan_criterion": "IOU", 3 | "dbscan_eps": { 4 | "car": 0.2, 5 | "pedestrian": 0.2, 6 | "cyclist": 0.2 7 | }, 8 | "dbscan_min_samples": { 9 | "car": 0.05, 10 | "pedestrian": 0.05, 11 | "cyclist":0.05 12 | }, 13 | "min_cov_to_cluster": { 14 | "car": 0.005, 15 | "pedestrian": 0.005, 16 | "cyclist": 0.005, 17 | "default": 0.005 18 | }, 19 | "min_obj_height": { 20 | "car": 2, 21 | "pedestrian": 2, 22 | "cyclist": 2, 23 | "default": 2 24 | }, 25 | "target_classes": ["car", "pedestrian","cyclist"], 26 | "confidence_th": { 27 | "car": 0.2, 28 | "pedestrian": 0.2, 29 | "cyclist": 0.2 30 | }, 31 | "confidence_model": { 32 | "car": { "kind": "aggregate_cov"}, 33 | "pedestrian": { "kind": "aggregate_cov"}, 34 | "cyclist": { "kind": "aggregate_cov"} 35 | }, 36 | "output_map": { 37 | "car" : "car", 38 | "pedestrian" : "pedestrian", 39 | "cyclist" : "cyclist" 40 | }, 41 | "color": { 42 | "car": "magenta", 43 | "pedestrian": "green", 44 | "cyclist": "cyan" 45 | }, 46 | "postproc_classes": ["car", "pedestrian", "cyclist"], 47 | "image_height": 128, 48 | "image_width": 512, 49 | "stride": 16 50 | } -------------------------------------------------------------------------------- /spec_files/retrain.txt: -------------------------------------------------------------------------------- 1 | random_seed: 42 2 | model_config { 3 | pretrained_model_file: "/workspace/pruned_model/resnet18_nopool_bn_detectnet_v2_pruned.tlt" 4 | num_layers: 18 5 | 6 | freeze_blocks: 0 7 | arch: "resnet" 8 | use_batch_norm: true 9 | activation { 10 | activation_type: "relu" 11 | } 12 | dropout_rate: 0.1 13 | objective_set: { 14 | cov {} 15 | bbox { 16 | scale: 35.0 17 | offset: 0.5 18 | } 19 | } 20 | training_precision { 21 | backend_floatx: FLOAT32 22 | } 23 | } 24 | 25 | bbox_rasterizer_config { 26 | target_class_config { 27 | key: "car" 28 | value: { 29 | cov_center_x: 0.5 30 | cov_center_y: 0.5 31 | cov_radius_x: 0.4 32 | cov_radius_y: 0.4 33 | bbox_min_radius: 1.0 34 | } 35 | } 36 | target_class_config { 37 | key: "pedestrian" 38 | value: { 39 | cov_center_x: 0.5 40 | cov_center_y: 0.5 41 | cov_radius_x: 1.0 42 | cov_radius_y: 1.0 43 | bbox_min_radius: 1.0 44 | } 45 | } 46 | target_class_config { 47 | key: "cyclist" 48 | value: { 49 | cov_center_x: 0.5 50 | cov_center_y: 0.5 51 | cov_radius_x: 1.0 52 | cov_radius_y: 1.0 53 | bbox_min_radius: 1.0 54 | } 55 | } 56 | deadzone_radius: 0.67 57 | } 58 | 59 | cost_function_config { 60 | target_classes { 61 | name: "car" 62 | class_weight: 1.0 63 | coverage_foreground_weight: 0.05 64 | objectives { 65 | name: "cov" 66 | initial_weight: 1.0 67 | weight_target: 1.0 68 | } 69 | objectives { 70 | name: "bbox" 71 | initial_weight: 10.0 72 | weight_target: 10.0 73 | } 74 | } 75 | target_classes { 76 | name: "pedestrian" 77 | class_weight: 1.0 78 | coverage_foreground_weight: 0.05 79 | objectives { 80 | name: "cov" 81 | initial_weight: 1.0 82 | weight_target: 1.0 83 | } 84 | objectives { 85 | name: "bbox" 86 | initial_weight: 10.0 87 | weight_target: 1.0 88 | } 89 | } 90 | target_classes { 91 | name: "cyclist" 92 | class_weight: 1.0 93 | coverage_foreground_weight: 0.05 94 | objectives { 95 | name: "cov" 96 | initial_weight: 1.0 97 | weight_target: 1.0 98 | } 99 | objectives { 100 | name: "bbox" 101 | initial_weight: 10.0 102 | weight_target: 10.0 103 | } 104 | } 105 | enable_autoweighting: True 106 | max_objective_weight: 0.9999 107 | min_objective_weight: 0.0001 108 | } 109 | 110 | training_config { 111 | batch_size_per_gpu: 16 112 | num_epochs: 120 113 | learning_rate { 114 | soft_start_annealing_schedule { 115 | min_learning_rate: 5e-6 116 | max_learning_rate: 5e-4 117 | soft_start: 0.1 118 | annealing: 0.7 119 | } 120 | } 121 | regularizer { 122 | type: L1 123 | weight: 3e-9 124 | } 125 | optimizer { 126 | adam { 127 | epsilon: 1e-08 128 | beta1: 0.9 129 | beta2: 0.999 130 | } 131 | } 132 | cost_scaling { 133 | enabled: False 134 | initial_exponent: 20.0 135 | increment: 0.005 136 | decrement: 1.0 137 | } 138 | checkpoint_interval: 10 139 | } 140 | 141 | augmentation_config { 142 | preprocessing { 143 | output_image_width: 512 144 | output_image_height: 128 145 | output_image_channel: 3 146 | min_bbox_width: 1.0 147 | min_bbox_height: 1.0 148 | } 149 | spatial_augmentation { 150 | hflip_probability: 0.5 151 | vflip_probability: 0.0 152 | zoom_min: 1.0 153 | zoom_max: 1.0 154 | translate_max_x: 8.0 155 | translate_max_y: 8.0 156 | } 157 | color_augmentation { 158 | color_shift_stddev: 0.0 159 | hue_rotation_max: 25.0 160 | saturation_shift_max: 0.2 161 | contrast_scale_max: 0.1 162 | contrast_center: 0.5 163 | } 164 | } 165 | 166 | postprocessing_config { 167 | target_class_config { 168 | key: "car" 169 | value: { 170 | clustering_config { 171 | coverage_threshold: 0.005 172 | dbscan_eps: 0.13 173 | dbscan_min_samples: 0.05 174 | minimum_bounding_box_height: 1 175 | } 176 | } 177 | } 178 | target_class_config { 179 | key: "pedestrian" 180 | value: { 181 | clustering_config { 182 | coverage_threshold: 0.005 183 | dbscan_eps: 0.15 184 | dbscan_min_samples: 0.05 185 | minimum_bounding_box_height: 1 186 | } 187 | } 188 | } 189 | target_class_config { 190 | key: "cyclist" 191 | value: { 192 | clustering_config { 193 | coverage_threshold: 0.005 194 | dbscan_eps: 0.15 195 | dbscan_min_samples: 0.05 196 | minimum_bounding_box_height: 1 197 | } 198 | } 199 | } 200 | } 201 | 202 | dataset_config { 203 | data_sources: { 204 | tfrecords_path: "/workspace/tf_records/*" 205 | image_directory_path: "/workspace/dataset/KITTI_original/training" 206 | } 207 | image_extension: "jpg" 208 | target_class_mapping { 209 | key: "car" 210 | value: "car" 211 | } 212 | target_class_mapping { 213 | key: "pedestrian" 214 | value: "pedestrian" 215 | } 216 | target_class_mapping { 217 | key: "cyclist" 218 | value: "cyclist" 219 | } 220 | validation_fold: 0 221 | } 222 | 223 | evaluation_config { 224 | validation_period_during_training: 10 225 | first_validation_epoch: 1 226 | minimum_detection_ground_truth_overlap { 227 | key: "car" 228 | value: 0.7 229 | } 230 | minimum_detection_ground_truth_overlap { 231 | key: "pedestrian" 232 | value: 0.5 233 | } 234 | minimum_detection_ground_truth_overlap { 235 | key: "cyclist" 236 | value: 0.5 237 | } 238 | evaluation_box_config { 239 | key: "car" 240 | value { 241 | minimum_height: 4 242 | maximum_height: 9999 243 | minimum_width: 4 244 | maximum_width: 9999 245 | } 246 | } 247 | evaluation_box_config { 248 | key: "pedestrian" 249 | value { 250 | minimum_height: 4 251 | maximum_height: 9999 252 | minimum_width: 4 253 | maximum_width: 9999 254 | } 255 | } 256 | evaluation_box_config { 257 | key: "cyclist" 258 | value { 259 | minimum_height: 4 260 | maximum_height: 9999 261 | minimum_width: 4 262 | maximum_width: 9999 263 | } 264 | } 265 | } 266 | -------------------------------------------------------------------------------- /spec_files/train.txt: -------------------------------------------------------------------------------- 1 | random_seed: 42 2 | model_config { 3 | pretrained_model_file: "/workspace/pretrained_model/tlt_resnet18_detectnet_v2_v1/resnet18.hdf5" 4 | num_layers: 18 5 | 6 | freeze_blocks: 0 7 | arch: "resnet" 8 | use_batch_norm: true 9 | activation { 10 | activation_type: "relu" 11 | } 12 | dropout_rate: 0.1 13 | objective_set: { 14 | cov {} 15 | bbox { 16 | scale: 35.0 17 | offset: 0.5 18 | } 19 | } 20 | training_precision { 21 | backend_floatx: FLOAT32 22 | } 23 | } 24 | 25 | bbox_rasterizer_config { 26 | target_class_config { 27 | key: "car" 28 | value: { 29 | cov_center_x: 0.5 30 | cov_center_y: 0.5 31 | cov_radius_x: 0.4 32 | cov_radius_y: 0.4 33 | bbox_min_radius: 1.0 34 | } 35 | } 36 | target_class_config { 37 | key: "pedestrian" 38 | value: { 39 | cov_center_x: 0.5 40 | cov_center_y: 0.5 41 | cov_radius_x: 1.0 42 | cov_radius_y: 1.0 43 | bbox_min_radius: 1.0 44 | } 45 | } 46 | target_class_config { 47 | key: "cyclist" 48 | value: { 49 | cov_center_x: 0.5 50 | cov_center_y: 0.5 51 | cov_radius_x: 1.0 52 | cov_radius_y: 1.0 53 | bbox_min_radius: 1.0 54 | } 55 | } 56 | deadzone_radius: 0.67 57 | } 58 | 59 | cost_function_config { 60 | target_classes { 61 | name: "car" 62 | class_weight: 1.0 63 | coverage_foreground_weight: 0.05 64 | objectives { 65 | name: "cov" 66 | initial_weight: 1.0 67 | weight_target: 1.0 68 | } 69 | objectives { 70 | name: "bbox" 71 | initial_weight: 10.0 72 | weight_target: 10.0 73 | } 74 | } 75 | target_classes { 76 | name: "pedestrian" 77 | class_weight: 1.0 78 | coverage_foreground_weight: 0.05 79 | objectives { 80 | name: "cov" 81 | initial_weight: 1.0 82 | weight_target: 1.0 83 | } 84 | objectives { 85 | name: "bbox" 86 | initial_weight: 10.0 87 | weight_target: 1.0 88 | } 89 | } 90 | target_classes { 91 | name: "cyclist" 92 | class_weight: 1.0 93 | coverage_foreground_weight: 0.05 94 | objectives { 95 | name: "cov" 96 | initial_weight: 1.0 97 | weight_target: 1.0 98 | } 99 | objectives { 100 | name: "bbox" 101 | initial_weight: 10.0 102 | weight_target: 10.0 103 | } 104 | } 105 | enable_autoweighting: True 106 | max_objective_weight: 0.9999 107 | min_objective_weight: 0.0001 108 | } 109 | 110 | training_config { 111 | batch_size_per_gpu: 16 112 | num_epochs: 120 113 | learning_rate { 114 | soft_start_annealing_schedule { 115 | min_learning_rate: 5e-6 116 | max_learning_rate: 5e-4 117 | soft_start: 0.1 118 | annealing: 0.7 119 | } 120 | } 121 | regularizer { 122 | type: L1 123 | weight: 3e-9 124 | } 125 | optimizer { 126 | adam { 127 | epsilon: 1e-08 128 | beta1: 0.9 129 | beta2: 0.999 130 | } 131 | } 132 | cost_scaling { 133 | enabled: False 134 | initial_exponent: 20.0 135 | increment: 0.005 136 | decrement: 1.0 137 | } 138 | checkpoint_interval: 10 139 | } 140 | 141 | augmentation_config { 142 | preprocessing { 143 | output_image_width: 512 144 | output_image_height: 128 145 | output_image_channel: 3 146 | min_bbox_width: 1.0 147 | min_bbox_height: 1.0 148 | } 149 | spatial_augmentation { 150 | hflip_probability: 0.5 151 | vflip_probability: 0.0 152 | zoom_min: 1.0 153 | zoom_max: 1.0 154 | translate_max_x: 8.0 155 | translate_max_y: 8.0 156 | } 157 | color_augmentation { 158 | color_shift_stddev: 0.0 159 | hue_rotation_max: 25.0 160 | saturation_shift_max: 0.2 161 | contrast_scale_max: 0.1 162 | contrast_center: 0.5 163 | } 164 | } 165 | 166 | postprocessing_config { 167 | target_class_config { 168 | key: "car" 169 | value: { 170 | clustering_config { 171 | coverage_threshold: 0.005 172 | dbscan_eps: 0.13 173 | dbscan_min_samples: 0.05 174 | minimum_bounding_box_height: 1 175 | } 176 | } 177 | } 178 | target_class_config { 179 | key: "pedestrian" 180 | value: { 181 | clustering_config { 182 | coverage_threshold: 0.005 183 | dbscan_eps: 0.15 184 | dbscan_min_samples: 0.05 185 | minimum_bounding_box_height: 1 186 | } 187 | } 188 | } 189 | target_class_config { 190 | key: "cyclist" 191 | value: { 192 | clustering_config { 193 | coverage_threshold: 0.005 194 | dbscan_eps: 0.15 195 | dbscan_min_samples: 0.05 196 | minimum_bounding_box_height: 1 197 | } 198 | } 199 | } 200 | } 201 | 202 | dataset_config { 203 | data_sources: { 204 | tfrecords_path: "/workspace/tf_records/*" 205 | image_directory_path: "/workspace/dataset/KITTI_original/training" 206 | } 207 | image_extension: "jpg" 208 | target_class_mapping { 209 | key: "car" 210 | value: "car" 211 | } 212 | target_class_mapping { 213 | key: "pedestrian" 214 | value: "pedestrian" 215 | } 216 | target_class_mapping { 217 | key: "cyclist" 218 | value: "cyclist" 219 | } 220 | validation_fold: 0 221 | } 222 | 223 | evaluation_config { 224 | validation_period_during_training: 10 225 | first_validation_epoch: 1 226 | minimum_detection_ground_truth_overlap { 227 | key: "car" 228 | value: 0.7 229 | } 230 | minimum_detection_ground_truth_overlap { 231 | key: "pedestrian" 232 | value: 0.5 233 | } 234 | minimum_detection_ground_truth_overlap { 235 | key: "cyclist" 236 | value: 0.5 237 | } 238 | evaluation_box_config { 239 | key: "car" 240 | value { 241 | minimum_height: 4 242 | maximum_height: 9999 243 | minimum_width: 4 244 | maximum_width: 9999 245 | } 246 | } 247 | evaluation_box_config { 248 | key: "pedestrian" 249 | value { 250 | minimum_height: 4 251 | maximum_height: 9999 252 | minimum_width: 4 253 | maximum_width: 9999 254 | } 255 | } 256 | evaluation_box_config { 257 | key: "cyclist" 258 | value { 259 | minimum_height: 4 260 | maximum_height: 9999 261 | minimum_width: 4 262 | maximum_width: 9999 263 | } 264 | } 265 | } 266 | -------------------------------------------------------------------------------- /tf_records/ignore.txt: -------------------------------------------------------------------------------- 1 | please ignore this file 2 | -------------------------------------------------------------------------------- /trained_model/ignore.txt: -------------------------------------------------------------------------------- 1 | please ignore this file 2 | --------------------------------------------------------------------------------