Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Object detection model customization Samples model does not support MediaPipe. Models are expected to have exactly four outputs, but only two were found. #473

Open
liangbuwen opened this issue Oct 25, 2024 · 0 comments

Comments

@liangbuwen
Copy link

liangbuwen commented Oct 25, 2024

The Object detection model customization Samples model does not support MediaPipe. Models are expected to have exactly 4 outputs, but only 2 were found.

I ran the code in the Object detection model customization guide to train a custom model

spec = object_detector.SupportedModels.MOBILENET_MULTI_AVG
hparams = object_detector.HParams(export_dir='exported_model')
options = object_detector.ObjectDetectorOptions(
    supported_model=spec,
    hparams=hparams
)

However, my custom model is not supported in the MediaPipe example.
Because the SupportedModels supported by the object detector solution are all trained with only 2 outputs:
detection_boxes and detection_scores,
which is inconsistent with the output format required of the model . ( outputs format required detection_boxes,detection_classes,detection_scores,num_boxes 4 outputs
How can I retrain a MobileNetv2 model to have four outputs that meet the requirements?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant