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

I would like to add the following features: the ability to output images beyond the box detection range, the ability to normalize facial images to the same size based on facial proportion, the ability to process images with alpha channels, and the ability to output images with alpha channels. #11413

Closed
2 tasks done
shelly-luo opened this issue Apr 21, 2023 · 2 comments
Labels
enhancement New feature or request Stale

Comments

@shelly-luo
Copy link

Search before asking

  • I have searched the YOLOv5 issues and found no similar feature requests.

Description

the ability to output images beyond the box detection range,
the ability to normalize facial images to the same size based on facial proportion,
the ability to process images with alpha channels,
and the ability to output images with alpha channels.

Use case

I am an art professional, and I dislike cutting images. I hope to automate the image processing.

Additional

By modifying plots.py, I successfully increased the cropping range of the cropped image. (I modified pad=300.)
def save_one_box(xyxy, im, file=Path('im.jpg'), gain=1.02, pad=300, square=False, BGR=False, save=True):

However, I couldn't handle the issue with the alpha channel. My coding skills are poor, so I could only write two scripts - one for adding a green background to the image, and another for removing the green background from the image - to deal with the transparency issue.

Add a green background
批量添加绿幕.txt

Remove a green background.
批量去除绿幕.txt

This is my processing workflow: original image with alpha channel > add green background to images using batch processing script > use YOLOv5 to detect faces > crop beyond the detected box > remove green background from output images using batch processing script.

未标题-2

I really need these features! Please help me out!

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@shelly-luo shelly-luo added the enhancement New feature or request label Apr 21, 2023
@glenn-jocher
Copy link
Member

@shelly-luo thank you for your detailed description and for taking the time to create those scripts. Regarding your feature requests, it seems like the ability to process images with alpha channels could be added to the code. To normalize facial images based on facial proportion, you may want to look into OpenCV or other image processing libraries, as this may not be a direct feature addition to the YOLOv5 code. Additionally, adding the ability to output images with alpha channels may also be possible, but it will likely require changes to the code or post-processing steps. I would recommend creating separate issues for each specific feature request so that it is easier to track and address them. Thank you for contributing to YOLOv5 with your proposed PR, and please let us know if you need further assistance.

@github-actions
Copy link
Contributor

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

@github-actions github-actions bot added the Stale label May 23, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

2 participants