question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tensorflow Object Detection API Model - Unsupported Ops in ssd_mobilenet_v2 model

See original GitHub issue

To get help from the community, check out our Google group.

TensorFlow.js version

@tensorflow/tfjs-converter: 0.1.1 (this was installed through pip)

Browser version

N/A (issue is related to tensorflowjs_converter)

Describe the problem or feature request

Unsupported Ops

I tried running the tensorflowjs_converter as follows: tensorflowjs_converter \ --input_format=tf_saved_model \ --output_node_names='detection_boxes,detection_classes,detection_scores,num_detections' \ --saved_model_tags=serve \ ~/workspace/model/saved_model \ ~/workspace/model/web_model

Once it is complete, I get the following output of unsupported ops: All, Assert, Enter, Exit, LoopCond, Merge, NextIteration, NonMaxSuppressionV2, Rank, ResizeBilinear, Size, Split, StridedSlice, Switch, TensorArrayGatherV3, TensorArrayReadV3, TensorArrayScatterV3, TensorArraySizeV3, TensorArrayV3, TensorArrayWriteV3, TopKV2, Unpack, Where This is a ssd_mobilenet_v2_coco model trained through tensorflow object detection api. It is performing well on tensorflow, but it contains ops not supported by tensorflowjs. I have tried several other models from the tensorflow model zoo, and they all have similiar unsupported ops.

Code to reproduce the bug / link to feature request

I found this GIST describing the exact issue: Convert Tensorflow SavedModel to WebModel for TF-JS From this GIST I got the following:

# Download the model files. 
wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_coco_2018_03_29.tar.gz 

# Untar the model .
tar -xzvf ssd_mobilenet_v2_coco_2018_03_29.tar.gz

pip install tensorflow-gpu # Or just tensorflow for CPU
pip install tensorflowjs

saved_model_cli show --dir ssd_mobilenet_v2_coco_2018_03_29/saved_model --tag_set serve --signature_def serving_default

tensorflowjs_converter \
    --input_format=tf_saved_model \
    --output_node_names='detection_boxes,detection_scores,num_detections,detection_classes' \
    --saved_model_tags=serve \
    ./ssd_mobilenet_v2_coco_2018_03_29/saved_model \
    ./ssd_mobilenet_v2_coco_2018_03_29/web_model

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:43 (13 by maintainers)

github_iconTop GitHub Comments

8reactions
dsmilkovcommented, Jul 20, 2018

We are actively working on this. I expect we’ll get this done in 1-2 weeks. Stay tuned.

8reactions
dougsouzacommented, May 30, 2018

It would be really cool to have support to TF object detection api models. As of now I installed tfjs-converter (through pip) and got the following unsupported ops (including some of which were already reported earlier) for a ssdlite mobilenet v2:

  • TensorArrayWriteV3
  • TensorArrayV3
  • TensorArrayGatherV3
  • TensorArrayReadV3
  • TopKV2
  • Where
  • All
  • Rank
  • NonMaxSuppressionV2
  • Assert
  • TensorArraySizeV3
  • Size
  • Unpack
  • TensorArrayScatterV3
Read more comments on GitHub >

github_iconTop Results From Across the Web

Weird results for different models of Tensorflow object ...
I am training 3 different models for covid-19 detection SSD MobileNetV2 FPNLite 320x320, SSD MobileNetV2 FPNLite 640x640, ...
Read more >
MobileNetV2 + SSDLite with Core ML - Machine, Think!
This model was trained using the TensorFlow Object Detection API ... ML can actually handle — the rest is full of unsupported operations....
Read more >
run SSD_MobileNetV2 (Tensorflow object detection API) on ...
I am working on inferencing using trained tensorflow SSD_mobilenetV2 models (from Tensorflow/models/research/object_detection), ...
Read more >
Converting a TensorFlow* Model - OpenVINO™ Documentation
Detailed information on how to convert models from the Object Detection Models Zoo is available in the Converting TensorFlow Object Detection API Models...
Read more >
Object Detection using SSD Mobilenet and Tensorflow Object ...
make sure to install pycocotools for coco detection API. !pip install pycocotools. step 3. get tensorflow/models by cloning the repository.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found