ryouchinsa / Rectlabel-support

RectLabel is an offline image annotation tool for object detection and segmentation.
https://rectlabel.com
515 stars 73 forks source link

When running the Auto labeling command with a CoreML model, a spinner appears and never stops, and no auto labels show up #215

Closed hqm closed 1 year ago

hqm commented 1 year ago

We trained a coreml object detection model on a Mac M1 laptop using XCode, from a COCO format dataset.

That produced a .mlmodel file, which we loaded in RectLabel using the "Load CoreML model" menu command.

However, when we click on Auto labeling, a spinner appears and never goes away, on any image we go it, and no auto labels appear.

There seems to be no error message, and I don't know how to look at app logs to see if there is one. RectLabel v Version 2023.02.15 (2023.02.15)

hqm commented 1 year ago
screenshot_530

You can see the spinner faintly in middle of screen image

ryouchinsa commented 1 year ago

Thanks for writing the issue.

We fixed so that loading Core ML models and processing the image works correctly. Including Core ML models trained on Create ML.

The new version 2023.02.20 was released. Could you tell us whether the problem was fixed in the latest vesion?

hqm commented 1 year ago

this works now to find bounding boxes with auto label

hqm commented 1 year ago

Is there a way to use a semantic segmentation model with auto label? So that it suggests a polygon mask rather than just a bounding box?

ryouchinsa commented 1 year ago

Please read this page. https://rectlabel.com/help#load_coreml

You can use YOLOv5, YOLOv8, IS-Net, and DeepLabV3 to auto label as polygons. When you are using the YOLO text format, the segmentation model auto label as polygons. When you are using the PASCAL VOC xml format, the segmentation model auto label as pixels.

coreml_polygon

hqm commented 1 year ago

Thank you, do you happen to know of any documentation that would tell us how to train a CoreML instance segmentation model of the type you mentioned? The XCode tool we were using only seemed to train an object detection model that returned bounding boxes.

ryouchinsa commented 1 year ago

How about training the YOLOv8 segmentation model on your macOS device? https://github.com/ultralytics/ultralytics

pip install ultralytics
yolo segment train data=coco128-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
yolo segment export model=best.pt format=coreml
ryouchinsa commented 1 year ago

Currently If you need our support to fix this problem, please let us know.