Coder Social home page Coder Social logo

labelme2coco's People

Contributors

xcrobert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

labelme2coco's Issues

Error while calling labelme2coco function

Traceback (most recent call last):
File "", line 1, in
File "/home/reshu/Downloads/labelme2coco-0.1.2/labelme2coco/init.py", line 14, in convert
labelme2coco(labelme_folder, save_json_path)
File "/home/reshu/Downloads/labelme2coco-0.1.2/labelme2coco/labelme2coco.py", line 34, in init
self.save_json()
File "/home/reshu/Downloads/labelme2coco-0.1.2/labelme2coco/labelme2coco.py", line 145, in save_json
self.data_transfer()
File "/home/reshu/Downloads/labelme2coco-0.1.2/labelme2coco/labelme2coco.py", line 50, in data_transfer
self.annotations.append(self.annotation(points, label, num))
File "/home/reshu/Downloads/labelme2coco-0.1.2/labelme2coco/labelme2coco.py", line 84, in annotation
annotation['bbox'] = list(map(float, self.getbbox(points)))
File "/home/reshu/Downloads/labelme2coco-0.1.2/labelme2coco/labelme2coco.py", line 112, in getbbox
mask = self.polygons_to_mask([self.height, self.width], polygons)
File "/home/reshu/Downloads/labelme2coco-0.1.2/labelme2coco/labelme2coco.py", line 134, in polygons_to_mask
mask = np.array(mask, dtype=bool)
TypeError: array() takes 1 positional argument but 2 were given

a error

Traceback (most recent call last):
File "/home/hustget/labelme2coco/coco.py", line 11, in
labelme2coco.convert(labelme_folder, save_json_path)
File "/media/hustget/E240392A40390737/labelme2coco/labelme2coco/init.py", line 14, in convert
labelme2coco(labelme_folder, save_json_path)
File "/media/hustget/E240392A40390737/labelme2coco/labelme2coco/labelme2coco.py", line 34, in init
self.save_json()
File "/media/hustget/E240392A40390737/labelme2coco/labelme2coco/labelme2coco.py", line 146, in save_json
self.data_transfer()
File "/media/hustget/E240392A40390737/labelme2coco/labelme2coco/labelme2coco.py", line 50, in data_transfer
self.annotations.append(self.annotation(points, label, num))
File "/media/hustget/E240392A40390737/labelme2coco/labelme2coco/labelme2coco.py", line 85, in annotation
annotation['bbox'] = list(map(float, self.getbbox(points)))
File "/media/hustget/E240392A40390737/labelme2coco/labelme2coco/labelme2coco.py", line 114, in getbbox
return self.mask2box(mask)
File "/media/hustget/E240392A40390737/labelme2coco/labelme2coco/labelme2coco.py", line 122, in mask2box
left_top_r = np.min(rows) # y
File "<array_function internals>", line 6, in amin
File "/home/hustget/miniconda2/envs/open-mmlab/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2831, in amin
keepdims=keepdims, initial=initial, where=where)
File "/home/hustget/miniconda2/envs/open-mmlab/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 87, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation minimum which has no identity

Process finished with exit code 1

No attribute 'convert'

Hi, thank you for this tool but i got an issue.

with this command

# convert labelme annotations to coco
labelme2coco.convert(labelme_folder, save_json_path)

I got AttributeError:
module 'labelme2coco' has no attribute 'convert'

self.mask2box(mask) ?

raceback (most recent call last):
File "/data/tools/1.py", line 330, in
labelme2coco(labelme_json,save_image_dir, coco_dir)
File "/data/tools/1.py", line 44, in init
self.save_json()
File "/data/tools/1.py", line 182, in save_json
self.data_transfer()
File "/data/tools/1.py", line 67, in data_transfer
self.annotations.append(self.annotation(points,label,num))
File "/data/tools/1.py", line 122, in annotation
annotation['bbox'] = list(map(float,self.getbbox(points)))
File "/data/tools/1.py", line 144, in getbbox
return self.mask2box(mask)
File "/data/tools/1.py", line 153, in mask2box
left_top_r = np.min(rows) # y
File "/home/anaconda3/envs/snake/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2618, in amin
initial=initial)
File "/home/anaconda3/envs/snake/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation minimum which has no identity

Error with Windows 11

Hi
I am using labelme2coco with pixellib.
It works fine with Windows10, but not with Windows11.
The tool creates a directory and then wants to write to a text file. Then Errno13 arises. I would be very happy about your help. best regards
labelme2coco-Error
Wilhelm

I have tried different versions.
pip3 install scikit-image==0.18.3
pip3 install numpy==1.19.5
pip3 install tensorflow==2.5.0
pip3 install imgaug
pip3 install pixellib --upgrade
pip3 install labelme2coco==0.1.2

NoneType'

你好!,运行代码 出现以下错误,请问是什么原因呢?

Traceback (most recent call last):
File "labelme2coco.py", line 162, in
labelme2coco(labelme_json,'train.json')
File "labelme2coco.py", line 34, in init
self.save_json()
File "labelme2coco.py", line 142, in save_json
self.data_transfer()
File "labelme2coco.py", line 42, in data_transfer
self.images.append(self.image(data,num,file_name))
File "labelme2coco.py", line 54, in image
img = img_b64_to_arr(data['imageData'])
File "/home/zhixing/mmdetection-2.1.0/image.py", line 12, in img_b64_to_arr
f.write(base64.b64decode(img_b64))
File "/home/zhixing/anaconda3/lib/python3.7/base64.py", line 80, in b64decode
s = _bytes_from_decode_data(s)
File "/home/zhixing/anaconda3/lib/python3.7/base64.py", line 46, in _bytes_from_decode_data
"string, not %r" % s.class.name) from None
TypeError: argument should be a bytes-like object or ASCII string, not 'NoneType'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.