No inference scripts for Yolact models

Hi,

I am trying to do instance segmentation with Hailo8. So, as a proof of concept I wanted to try out the available HEF files and their results on my data.

I don’t want to use YOLOv5 or YOLOv8.

I haven’t been able to find any inference script either in CPP or Python that would support Yolact_regnetx models. I looked here already -

hailo-ai/Hailo-Application-Code-Examples

I am trying to make my own, based on the code, although it would help a lot if you can share your ideas.

Thanks

Hey @Shashwat_Pandey1 ,

To run YOLACT RegNetX instance segmentation models on Hailo8, you can use the existing instance segmentation examples (YOLOv5-seg or YOLOv8-seg) from the Hailo Application Code Examples repository and modify them for your YOLACT model.

Steps to Adapt the Existing Examples:

  1. Start with the existing instance segmentation example: Use either the C++ or Python YOLOv5-seg/YOLOv8-seg example as your base.
  2. Understand your model’s structure: Run hailortcli parse-hef {your_yolact_model.hef} to identify the input and output layers of your YOLACT RegNetX model.
  3. Update model parameters: Modify the configuration parameters in the example to match your YOLACT model specifications:
  • Input dimensions
  • Number of classes
  • Model-specific thresholds
  1. Replace the post-processing logic: The key modification is implementing YOLACT-specific post-processing to replace the YOLO post-processing. YOLACT outputs require different handling for:
  • Prototype masks
  • Mask coefficients
  • Bounding boxes
  • Class predictions

Hope this helps!

Thanks for responding, will try to make it