Gradiant / pyodi

Python Object Detection Insights
https://gradiant.github.io/pyodi/
Mozilla Public License 2.0
192 stars 16 forks source link

Question about coco merge #178

Closed ChrisTurnbull04 closed 1 year ago

ChrisTurnbull04 commented 1 year ago

I am attempting to merge 2 coco format file with pyodi and i cannot get it to work at all.

The command I am running: pyodi coco merge result.json studio_test_val.json output.json

The error I am getting: Traceback (most recent call last):

  File "/home/christ/miniconda3/envs/label-studio/bin/pyodi", line 5, in <module>
    from pyodi.cli import app
  File "/home/christ/miniconda3/envs/label-studio/lib/python3.9/site-packages/pyodi/cli.py", line 5, in <module>
    from pyodi.apps.evaluation import evaluation
  File "/home/christ/miniconda3/envs/label-studio/lib/python3.9/site-packages/pyodi/apps/evaluation.py", line 39, in <module>
    from pycocotools.cocoeval import COCOeval
  File "/home/christ/miniconda3/envs/label-studio/lib/python3.9/site-packages/pycocotools/cocoeval.py", line 7, in <module>
    from . import mask as maskUtils
  File "/home/christ/miniconda3/envs/label-studio/lib/python3.9/site-packages/pycocotools/mask.py", line 3, in <module>
    import pycocotools._mask as _mask
  File "pycocotools/_mask.pyx", line 1, in init pycocotools._mask
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Please help me with this issue. Thank you.

jorgenusan commented 1 year ago

Hi!

This bug may be due to the numpy version. Which version are you using?

If you have installed pyodi from source make sure you have followed the steps in the documentation to install the libraries with the required versions in the environment you want to use.

ChrisTurnbull04 commented 1 year ago

Hi,

Thank you for the help, the issue was the numpy version, after installing from the source it worked fine.