Label-studio: Export is only exporting annotations and not the images

Created on 26 Jan 2021  路  4Comments  路  Source: heartexlabs/label-studio

Version:

Label Studio version: 0.9.0.post5

Python error stack
[2021-01-25 21:13:39,161] [ERROR] [label_studio_converter.converter::convert_to_voc::412] Unable to download /data/upload/f78f75-IMG_7224.jpg. The item {'id': 5, 'input': {'image': '/data/upload/f78f75-IMG_7224.jpg'}, 'output': defaultdict(, {'label': [{'height': 16.4, 'rectanglelabels': ['clubhandle'], 'rotation': 0, 'width': 17.066666666666666, 'x': 18.4, 'y': 0, 'type': 'RectangleLabels', 'original_width': 3024, 'original_height': 4032}, {'height': 25.2, 'rectanglelabels': ['clubhandle'], 'rotation': 0, 'width': 11.6, 'x': 19.2, 'y': 74.8, 'type': 'RectangleLabels', 'original_width': 3024, 'original_height': 4032}]})} will be skipped
Traceback (most recent call last):
File "/home/jth/python/label-studio/lib/python3.8/site-packages/label_studio_converter/converter.py", line 408, in convert_to_voc
image_path, is_downloaded = download(image_path, output_image_dir)
File "/home/jthpython/label-studio/lib/python3.8/site-packages/label_studio_converter/utils.py", line 75, in download
r = requests.get(url)
File "/home/jth/python/label-studio/lib/python3.8/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, *kwargs)
File "/home/jth/python/label-studio/lib/python3.8/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, *
kwargs)
File "/home/jth/python/label-studio/lib/python3.8/site-packages/requests/sessions.py", line 519, in request
prep = self.prepare_request(req)
File "/home/jth/python/label-studio/lib/python3.8/site-packages/requests/sessions.py", line 452, in prepare_request
p.prepare(
File "/home/jth/python/label-studio/lib/python3.8/site-packages/requests/models.py", line 313, in prepare
self.prepare_url(url, params)
File "/home/jth/python/label-studio/lib/python3.8/site-packages/requests/models.py", line 387, in prepare_url
raise MissingSchema(error)

requests.exceptions.MissingSchema: Invalid URL '/data/upload/f78f75-IMG_7224.jpg': No schema supplied. Perhaps you meant http:///data/upload/f78f75-IMG_7224.jpg?

It appears that requests module does not support local file URLs. This used to work but appears to be broken.

bug

Most helpful comment

Tested and it is working now.

label-studio 0.9.0.post5
label-studio-converter 0.0.22.post2

All 4 comments

Tested on 0.8.2 and all export types work. Appears the 0.9.x version is broken.

@jthaloor Thank you very much, it's a bug, I'll try to solve it asap.

@jthaloor Try to

pip install -U label-studio-converter

and do export again.

Tested and it is working now.

label-studio 0.9.0.post5
label-studio-converter 0.0.22.post2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mimre25 picture mimre25  路  6Comments

kgeis picture kgeis  路  4Comments

laynr picture laynr  路  4Comments

fakyras picture fakyras  路  3Comments

andreaferretti picture andreaferretti  路  5Comments