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
Enable to set random ranges to RandomEmojiOverlay parameters #177
Conversation
Add CI testing Github action
Merge python & reqs steps
Add CI testing GitHub action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lyakaap, thanks so much for this PR! :)
I left a couple comments with small changes I'd like before landing this. You will indeed need to replace the expected output file for the RandomEmojiOverlay
unit test. You can do this e.g. by temporarily adding a line pil_dst.save("augly/assets/tests/image/dfdc_expected_output/test_RandomEmojiOverlay.png")
here and then running python -m unittest augly.tests.image_tests.functional_unit_test.FunctionalImageUnitTest.test_RandomEmojiOverlay
. Then if that passes, remove the line you added in base_unit_test.py
and commit your changes (should just be the new test_RandomEmojiOverlay.png
file)!
ea1ced9
to
7774328
Compare
Thank you for your quick & kind review! I reflected your review and confirmed the tests are passed. |
@zpapakipos has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay with reviewing this PR, I was on PTO for the holidays! :) Please fix the nits I suggested below, and also run black
on the files which are failing in the lint workflow, as you can see.
black augly/image/functional.py
black augly/tests/image_tests/transforms_unit_test.py
@lyakaap has updated the pull request. You must reimport the pull request before landing. |
@lyakaap has updated the pull request. You must reimport the pull request before landing. |
@lyakaap has updated the pull request. You must reimport the pull request before landing. |
@zpapakipos has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@lyakaap has updated the pull request. You must reimport the pull request before landing. |
@lyakaap has updated the pull request. You must reimport the pull request before landing. |
@lyakaap has updated the pull request. You must reimport the pull request before landing. |
@zpapakipos has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@lyakaap has updated the pull request. You must reimport the pull request before landing. |
@zpapakipos has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@lyakaap has updated the pull request. You must reimport the pull request before landing. |
@zpapakipos has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@lyakaap has updated the pull request. You must reimport the pull request before landing. |
@zpapakipos has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary
Added randomness to RandomEmojiOverlay parameters like emoji_size.
A motivation is that I wanted to randomly change the parameters on-the-fly, rather than "fixed" like current implementation.
This modified augmentation was actually used in ISC21 Descriptor Track 1st-place solution.
Test Results
The tests are passed except the following error.
It seems that expected image has alpha channel whereas output image doesn't have alpha channel.
I'm not sure why it happened. Replacing the expected image is needed?