imglab icon indicating copy to clipboard operation
imglab copied to clipboard

Exporting data in YOLO format

Open amitguptagwl opened this issue 5 years ago • 17 comments

This feature is suitable for first-timers. But can be picked by any contributor.

Currently imglab supports exporting labelled data in Pascal VOC, COCO format. We want to let users export data in YOLO format as well.

target folder : data formaters

Please check how export feature is implemented for other formats in data formaters

Watch for changes, or Bookmark for easy discovery. Fund this project for new features and maintenance. [Showcase] your project with us by raising an issue


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

amitguptagwl avatar Aug 21 '18 10:08 amitguptagwl

Hi I am a newcomer and would like to contribute to this project, which would be my first. Has this task been assigned yet?

JacobMarkBaird1998 avatar Aug 30 '18 02:08 JacobMarkBaird1998

@JacobMarkBaird1998 Yes you can go ahead with this. Let me know if you need any help.

amitguptagwl avatar Aug 30 '18 03:08 amitguptagwl

Thank you, I've been looking for resources to familiarize myself with the YOLO format. I've found resources that say the file extension is just .txt. Does this sound right? I'm using these pages as reference: https://github.com/AlexeyAB/Yolo_mark/issues/60 http://guanghan.info/download/before_conversion.txt http://guanghan.info/download/after_conversion.txt

JacobMarkBaird1998 avatar Aug 31 '18 01:08 JacobMarkBaird1998

It looks good. You can generate YOLO file from other tools as well and compare if both are same. https://github.com/tzutalin/labelImg

You can also check this python code for implementation reference: https://github.com/tzutalin/labelImg/blob/master/libs/yolo_io.py

Finally you can import generated file in other image annotation application to test.

amitguptagwl avatar Aug 31 '18 01:08 amitguptagwl

Thanks a lot Amit!

JacobMarkBaird1998 avatar Aug 31 '18 01:08 JacobMarkBaird1998

Should each image be written to a single YOLO .txt file, such as in writing to COCO, or should only the selected image be written, such as in writing to Pascal VOC?

JacobMarkBaird1998 avatar Aug 31 '18 02:08 JacobMarkBaird1998

The image which is currently open should be written in YOLO format. However it'll good if we can ask user to "export current" or "export all".

For this we'll have to redesign export pop up window.

amitguptagwl avatar Aug 31 '18 02:08 amitguptagwl

Okay, thank you. This is what I was going with until now.

JacobMarkBaird1998 avatar Aug 31 '18 02:08 JacobMarkBaird1998

I am getting this error when trying to call my "yoloFormater.toYOLO()" function defined inside my yolo.js file. Any idea what the issue is, and how I might solve it? Thanks image image image

JacobMarkBaird1998 avatar Sep 01 '18 14:09 JacobMarkBaird1998

I believe you're not including your JS file in index.html

amitguptagwl avatar Sep 01 '18 15:09 amitguptagwl

Yes, that was the problem and it is working now. I am just trying to push my branch however I am receiving an error 403 message: Opening repositories: C:\Users\Jacob\Documents\VisualStudioRepos Error encountered while pushing branch to the remote repository: Git failed with a fatal error. unable to access 'https://github.com/NaturalIntelligence/imglab.git/': The requested URL returned error: 403 Pushing to https://github.com/NaturalIntelligence/imglab.git Do you kn ow what is going wrong here?

JacobMarkBaird1998 avatar Sep 01 '18 18:09 JacobMarkBaird1998

Have you tested that the generated file is working fine other application too?

You need to fork to submit the PR. You can't directly push in this repository.

Once your PR is successfully merged, you can submit it for the rewards on steemit.com which will be reviewed by utopian. So you need take care of it's tag, and format. Check this submission : https://steemit.com/utopian-io/@alvinvoo/project-update-imglab-new-features

amitguptagwl avatar Sep 02 '18 02:09 amitguptagwl

Thank you, Amit. Sorry for the easy questions, I'm just a newbie to GitHub and haven't used it outside of school at all haha

JacobMarkBaird1998 avatar Sep 02 '18 23:09 JacobMarkBaird1998

No problem. My main aim of creating issues is to give the chance to new contributors and mentor them. Please check this link: https://github.com/Roshanjossey/first-contributions

amitguptagwl avatar Sep 03 '18 01:09 amitguptagwl

This issue is ready to be picked by any contributor. You can check #97 for implementation help and other discussions.

amitguptagwl avatar Sep 23 '18 14:09 amitguptagwl

I am getting this error when trying to call my "yoloFormater.toYOLO()" function defined inside my yolo.js file. Any idea what the issue is, and how I might solve it? Thanks image image image

Hi @JacobMarkBaird1998

Is dw = 1/image_width and dh = 1/image_height? Also, how do you get shape.bbox.x and shape.bbox.y?

I wanted to convert the float form of x,y,w,h from the yolo format to a format like 240, 240, 100, 150 where (240, 240) are centers of the boxes and (100,150) are the width and the height of the boxes. Thank you!

kenrubiooo avatar Nov 23 '18 05:11 kenrubiooo

@kenrubiooo You're trying to open the html file directly in the browser. Try http-server or live-server to run the app locally to test. Check this guide for more detail.

amitguptagwl avatar Nov 23 '18 05:11 amitguptagwl