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

Add NMS to CoreML model output, works with Vision #7263

Closed
wants to merge 4 commits into from
Closed

Add NMS to CoreML model output, works with Vision #7263

wants to merge 4 commits into from

Commits on Apr 3, 2022

  1. Add NMS to CoreML model output, works with Vision

    Reference issues: #5157 , #343 , #7011
    
    The current version of the export.py script outputs a CoreML model without NMS. This means that certain Vision APIs cannot be used with the model directly, as the output during inference is VNCoreMLFeatureValueObservation. The changes implemented here add a NMS layer to the CoreML output, so the output from inference is VNRecognizedObjectObservation. By adding NMS to the model directly, as opposed to later in code, the performance of the overall image/video processing is improved. This also allows use of the "Preview" tab in Xcode for quickly testing the model.
    
    Default IoU and confidence thresholds are taken from the `--iou-thres` and `--conf-thres` arguments during export.py script runtime. The user can also change these later by using a CoreML MLFeatureProvider in their application (see [https://developer.apple.com/documentation/coreml/mlfeatureprovider](https://developer.apple.com/documentation/coreml/mlfeatureprovider)).
    
    This has no effect on training, as it only adds an additional layer during CoreML export for NMS.
    mshamash committed Apr 3, 2022
    Configuration menu
    Copy the full SHA
    4ccb8b5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    749d8eb View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2022

  1. Configuration menu
    Copy the full SHA
    761303c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6bff769 View commit details
    Browse the repository at this point in the history