Skip to content

Python: bodypix model from tfjs: cannot create layer Minimum in getLayerInstance #17243

@lucyllewy

Description

@lucyllewy
System information (version)
  • OpenCV => opencv_python-4.2.0.32 (inside a venv installed via pip) and also a version built from master (commit hash 0979940)
  • Operating System / Platform => Ubuntu 20.04 (amd64)
  • Compiler => ❔ N/A
Detailed description

The converted bodypix (mobilenet v2?) dnn model from tfjs loaded into opencv in python using cvNet = cv2.dnn.readNetFromTensorflow fails when calling cvNet.forward() with the following error:

Traceback (most recent call last):
  File "test-bodypix.py", line 7, in <module>
    results = cvNet.forward()
cv2.error: OpenCV(4.2.0) /io/opencv/modules/dnn/src/dnn.cpp:562: error: (-2:Unspecified error) Can't create layer "clip_by_value/Minimum" of type "Minimum" in function 'getLayerInstance'

Download URLs for original unconverted bodypix model.json files (I've also attached the converted model.pb that I am using below):

https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/mobilenet/float/050/model-stride16.json
https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/mobilenet/float/050/group1-shard1of1.bin

Steps to reproduce
Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    answers.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions