dctian / DeepPiCar

Deep Learning Autonomous Car based on Raspberry Pi, SunFounder PiCar-V Kit, TensorFlow, and Google's EdgeTPU Co-Processor
GNU General Public License v3.0
400 stars 271 forks source link

Create traffic sign detector with tensorflow and Edge TPU #1

Closed dctian closed 4 years ago

dctian commented 5 years ago

Use transfer learning to train my road sign images with mobilenet SSD v2 on coco data set.

aleonnet commented 5 years ago

Hi David @dctian, Awesome work, congratulations! I'm working on my Self Driving Car project, and I'll follow most of your steps as soon as I got my Edge TPU!

Do you know why this IO728 events keeps showing between after each index creation? (samples bellow)

Thank you, Alessandro

creating index... index created! Running per image evaluation... Evaluate annotation type bbox DONE (t=0.06s). Accumulating evaluation results... DONE (t=0.05s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.467 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.872 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.426 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.341 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.501 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.416 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.557 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.557 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.340 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.601 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1.000 I0728 23:29:03.358836 140545134077824 evaluation.py:275] Finished evaluation at 2019-07-28-23:29:03 I0728 23:29:03.359204 140545134077824 estimator.py:2039] Saving dict for global step 657: DetectionBoxes_Precision/mAP = 0.46747395, DetectionBoxes_Precision/mAP (large) = -1.0, DetectionBoxes_Precision/mAP (medium) = 0.5011578, DetectionBoxes_Precision/mAP (small) = 0.34059405, DetectionBoxes_Precision/mAP@.50IOU = 0.8721576, DetectionBoxes_Precision/mAP@.75IOU = 0.42574614, DetectionBoxes_Recall/AR@1 = 0.41583332, DetectionBoxes_Recall/AR@10 = 0.5575, DetectionBoxes_Recall/AR@100 = 0.5575, DetectionBoxes_Recall/AR@100 (large) = -1.0, DetectionBoxes_Recall/AR@100 (medium) = 0.6011111, DetectionBoxes_Recall/AR@100 (small) = 0.34, Loss/classification_loss = 1.8518326, Loss/localization_loss = 0.5965765, Loss/regularization_loss = 0.34770772, Loss/total_loss = 2.7961168, global_step = 657, learning_rate = 0.004, loss = 2.7961168 I0728 23:29:03.365358 140545134077824 estimator.py:2099] Saving 'checkpoint_path' summary for global step 657: /content/gdrive/My Drive/Colab Notebooks/TransferLearning/Training/model.ckpt-657 I0728 23:35:32.553739 140545134077824 basic_session_run_hooks.py:692] global_step/sec: 0.110313 I0728 23:35:32.555619 140545134077824 basic_session_run_hooks.py:260] loss = 2.2563443, step = 701 (906.509 sec) I0728 23:38:47.244457 140545134077824 basic_session_run_hooks.py:606] Saving checkpoints for 723 into /content/gdrive/My Drive/Colab Notebooks/TransferLearning/Training/model.ckpt. I0728 23:38:51.620083 140545134077824 estimator.py:1145] Calling model_fn. I0728 23:38:54.740097 140545134077824 convolutional_box_predictor.py:151] depth of additional conv before box predictor: 0 I0728 23:38:54.783887 140545134077824 convolutional_box_predictor.py:151] depth of additional conv before box predictor: 0 I0728 23:38:54.827448 140545134077824 convolutional_box_predictor.py:151] depth of additional conv before box predictor: 0 I0728 23:38:54.872384 140545134077824 convolutional_box_predictor.py:151] depth of additional conv before box predictor: 0 I0728 23:38:54.916498 140545134077824 convolutional_box_predictor.py:151] depth of additional conv before box predictor: 0 I0728 23:38:54.960787 140545134077824 convolutional_box_predictor.py:151] depth of additional conv before box predictor: 0 I0728 23:38:58.191401 140545134077824 quantize.py:298] Skipping quant after FeatureExtractor/MobilenetV2/Conv/add_fold I0728 23:38:58.191925 140545134077824 quantize.py:298] Skipping quant after FeatureExtractor/MobilenetV2/expanded_conv/depthwise/add_fold I0728 23:38:58.192325 140545134077824 quantize.py:298] Skipping quant after FeatureExtractor/MobilenetV2/expanded_conv_1/expand/add_fold ...

### +40 quantize.py events

... I0728 23:38:59.477310 140545134077824 estimator.py:1147] Done calling model_fn. I0728 23:38:59.499190 140545134077824 evaluation.py:255] Starting evaluation at 2019-07-28T23:38:59Z I0728 23:39:01.668412 140545134077824 monitored_session.py:240] Graph was finalized. I0728 23:39:01.672174 140545134077824 saver.py:1280] Restoring parameters from /content/gdrive/My Drive/Colab Notebooks/TransferLearning/Training/model.ckpt-723 I0728 23:39:03.441343 140545134077824 session_manager.py:500] Running local_init_op. I0728 23:39:03.651742 140545134077824 session_manager.py:502] Done running local_init_op. I0728 23:39:07.827493 140543683032832 coco_evaluation.py:205] Performing evaluation on 5 images. creating index... index created! I0728 23:39:07.828111 140543683032832 coco_tools.py:115] Loading and preparing annotation results... I0728 23:39:07.829092 140543683032832 coco_tools.py:137] DONE (t=0.00s) creating index... index created! Running per image evaluation... Evaluate annotation type bbox DONE (t=0.06s). Accumulating evaluation results... DONE (t=0.05s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.454 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.838 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.373 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.230 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.509 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.400 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.542 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.542 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.230 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.618 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1.000 I0728 ...

dctian commented 5 years ago

Hi Alessandro,

Sorry about the late reply. I was very busy with job search and moving last few months. I looked through my logs, and I can't find any IO728 events in any logs. Are you just getting these in the logs, or was the object detection not well working for you after training? let me know. thanks