gustavz / realtime_object_detection

Plug and Play Real-Time Object Detection App with Tensorflow and OpenCV

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any plan to upgrade object detection model to mobilenetV2-ssdlite?

pegatest opened this issue · comments

Great work! I can easily reproduce FPS 25 object detection on TX2.
Wondering if any plan to upgrade object detection model to mobilenetV2-ssdlite? should be another performance lift with new model. Thanks.

commented

Hi pegatest,

now, my forked repository support ssd_mobilenet_v2 and ssdlite_mobilenet_v2.
try it.
https://github.com/naisy/realtime_object_detection

Nice work @naisy, your fork is really far off from the base right now :D
What is necessary to get mnv2 compability? did you investigate the graph for custom split points or did you find another way?

commented

Hi @gustavz,

I looked the graph.
Input of BatchMultiClassNonMaxSuppression has increased to three.

  1. I added a placeholder for new input.
  2. And the score has been renamed to slice.
  3. ExpandDims is unchanged.
  • Add new input to ToFloat. (At first I divided it in another node, but because the not found node in NMS occurred, I changed the division location to ToFloat.)
  • Score renames to Slice. (Postprocessor/convert_scores -> Postprocessor/Slice)
  • ExpandDims is the same.
  • Add ToFloat to SessonWorker's opt. (gpu_opts = [slice1_out, expand_out, tofloat_out])
  • Add ToFloat to SessionWorker's feeds. (cpu_feeds = {slice1_in: slice1, expand_in: expand, tofloat_in: tofloat})
  • Add ToFloat return variable from gpu woker's output queue. (slice1, expand, tofloat, extras = g['results'][0], g['results'][1], g['results'][2], g['extras'])

slice1 and tofloat is good word for search in source code.
https://github.com/naisy/realtime_object_detection/blob/master/lib/load_graph_nms_v2.py
https://github.com/naisy/realtime_object_detection/blob/master/lib/detection_nms_v2.py

@naisy alright, I think about integrating the v2 support. But right now I don't have enough time.
Another question: How did you do you Ampere/Volt measurements? Is there an open-source tool or did you measure it by hand with a multimeter?

commented

Hi @gustavz,

I changed ToFloat to stack_1 now.
I wrote simple howto about split model.
https://github.com/naisy/realtime_object_detection/blob/master/About_Split-Model.md

I use TAP-TST5 watt checker. It is a type of wattage checker to measure with an outlet. Accuracy is not good.

@naisy how is performance on MobileNetV2 compared to V1?

commented

Hi @gustavz,

MobileNetV2 is slow on desktop GPU.
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md

For example Mobilenet V2 is faster on mobile devices than Mobilenet V1, but is slightly slower on desktop GPU.

my result:
Tensorflow r1.6.1 on PC 160x120 without visualization.
| ssd_mobilenet_v1_0.75_depth_quantized_300x300_coco14_sync_2018_07_03 | 283 FPS |
| ssd_mobilenet_v1_0.75_depth_300x300_coco14_sync_2018_07_03 | 280 FPS |
| ssd_mobilenet_v1_ppn_shared_box_predictor_300x300_coco14_sync_2018_07_03 | 266 FPS |
| ssdlite_mobilenet_v2_coco_2018_05_09 | 238 FPS |
| ssd_mobilenet_v1_coco_2018_01_28 | 230 FPS |
| ssd_mobilenet_v1_quantized_300x300_coco14_sync_2018_07_03 | 221 FPS |
| ssd_mobilenet_v11_coco | 208 FPS |
| ssd_mobilenet_v1_coco_2017_11_17 | 145 FPS |
| ssd_mobilenet_v2_coco_2018_03_29 | 106 FPS |
| ssd_inception_v2_coco_2017_11_17 | 69 FPS |
| ssd_inception_v2_coco_2018_01_28 | 73 FPS |
| ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03 | 14 FPS |
| ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03 | 19 FPS |