vietanhdev / anylabeling

Effortless AI-assisted data labeling with AI support from YOLO, Segment Anything (SAM+SAM2), MobileSAM!!
https://anylabeling.nrl.ai
GNU General Public License v3.0
2.2k stars 236 forks source link

bug: App crashes while loading images on intel mac #31

Closed Smikha closed 1 year ago

Smikha commented 1 year ago

Steps to reproduce:

When attempting to import image files, the app crashes with the following error:

  File "/Users/sm/Documents/repos/anylabeling/.venv/lib/python3.10/site-packages/anylabeling/views/labeling/widgets/canvas.py", line 263, in mouseMoveEvent
    pos = self.transform_pos(ev.localPos())
  File "/Users/sm/Documents/repos/anylabeling/.venv/lib/python3.10/site-packages/anylabeling/views/labeling/widgets/canvas.py", line 899, in transform_pos
    return point / self.scale - self.offset_to_center()
  File "/Users/sm/Documents/repos/anylabeling/.venv/lib/python3.10/site-packages/anylabeling/views/labeling/widgets/canvas.py", line 911, in offset_to_center
    return QtCore.QPoint(x, y)
TypeError: arguments did not match any overloaded call:
  QPoint(): too many arguments
  QPoint(int, int): argument 1 has unexpected type 'float'
  QPoint(QPoint): argument 1 has unexpected type 'float'

I've tried to modify the offset_to_center file so that it passes int to the QPoint function, but I still receive the same error.

vietanhdev commented 1 year ago

Can you try to install it by single command?

pip install anylabeling

Tell me if there is still an error. Thank you.

vietanhdev commented 1 year ago

Maybe this bug is related to Python 3.10. https://github.com/wkentaro/labelme/issues/1020 Can you try Python 3.8 and 3.9?

vietanhdev commented 1 year ago

Fixed this issue on #33. Please pull the latest code or install v0.2.4 from Pypi. Thank you for your bug report.

ryouchinsa commented 1 year ago

Thanks for your great tool AnyLabeling.

RectLabel is an offline image annotation tool for object detection and segmentation. Although this is not an open source program, you can label polygons using Segment Anything models.

sam_polygon