xcrobert / labelme2coco Goto Github PK
View Code? Open in Web Editor NEWMake your own dataset for object detection and transform the format to coco json format
License: GNU General Public License v3.0
Make your own dataset for object detection and transform the format to coco json format
License: GNU General Public License v3.0
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
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
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'
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
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
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
你好!,运行代码 出现以下错误,请问是什么原因呢?
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'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.