Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self.mask2box(mask) ? #1

Open
watertianyi opened this issue Mar 30, 2020 · 1 comment
Open

self.mask2box(mask) ? #1

watertianyi opened this issue Mar 30, 2020 · 1 comment

Comments

@watertianyi
Copy link

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

@fcakyon
Copy link

fcakyon commented May 21, 2020

you can use https://github.com/fcakyon/labelme2coco for improved version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants