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

Initial Mosaic augmentation implementation #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmatos2012
Copy link

As per your given TODOs in the README, I thought it would be nice to add initial mosaic augmentation to this codebase. Original implementation is from YoloV5 repo, which I have slightly tweaked to fit here.

I currently do not have the hardware to train with this implementation, but I still would like to contribute. Thats how some of them look visualized from the train script in img, target = create_dataset(args)
train_img_26
img_14.

Sometimes the bboxes look off as well. If you give me any pointers to improve the implementation, or to test (on limited hardware) whether this augmentation works here, please let me know. I am willing to make changes if needed, as I am just starting in this deep learning world.

It does add an opencv dependency as per the original repo, so dont know whether that is a problem. Thanks!

@rwightman
Copy link
Owner

rwightman commented Jun 17, 2021

@dmatos2012 thanks for the impl, unfortunately I can't merge. Yolov5 is GPL-3 license so I can't include any code from that project here as it would be in conflict with keeping my license Apache 2.0. Any impl would need to be from scratch or based on another Apache/BSD/MIT/etc licensed project that did not originate from Yolov5/3 (Yolov4 / darknet are fine, but they're c++ so not a cut and paste job).

I'll leave this open for now and try to find some time to try it, if it does prove useful then it will raise priority of implementing from scratch.

@dmatos2012
Copy link
Author

Oh, I am sorry, I did not read the license previously. I will try to contribute with other ones from your TODOs , or if you have any other "low hanging fruit" that have since came up, I can also give them a try.

Thanks for the quick reply.

@Promisery
Copy link

In load_image, when r != 1, the image is resized while bbox is not, which may lead to some problems when the data format is not in yolo style. Maybe you can use resize functions from albumentations or other libraries that can handle image and bbox together.

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

Successfully merging this pull request may close these issues.

None yet

3 participants