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

Refactored and replaced badphotocopy augmentation & Bug fixed in folding. #59

Merged
merged 7 commits into from Aug 25, 2021

Conversation

kwcckw
Copy link
Collaborator

@kwcckw kwcckw commented Aug 22, 2021

No description provided.

@kwcckw
Copy link
Collaborator Author

kwcckw commented Aug 22, 2021

Example of augmented image with sparse noise parameters:

image

Example of augmented image with non-sparse noise parameters:
image

@kwcckw
Copy link
Collaborator Author

kwcckw commented Aug 22, 2021

@proofconstruction Could you advise on this error?

image

The error mentioned those files need to be reformatted, but is there any guidance on how to format those files?

@proofconstruction
Copy link
Collaborator

This means you should run the black reformat tool on your code and then commit again. If you pip install black you can then run black . in the project directory to format the new files.

@kwcckw
Copy link
Collaborator Author

kwcckw commented Aug 23, 2021

This means you should run the black reformat tool on your code and then commit again. If you pip install black you can then run black . in the project directory to format the new files.

Thanks, i will try it out later.

@kwcckw
Copy link
Collaborator Author

kwcckw commented Aug 23, 2021

@proofconstruction Looks like there's still error in python 3.6, and i think the image size is <30 (xs = 16), so the pytest didn't include the min image size limitation?

image

Anyway, i will check again by reinstalling python 3.6 later.

@kwcckw
Copy link
Collaborator Author

kwcckw commented Aug 24, 2021

The previous errors should be resolved with my latest push, please check again.

@proofconstruction
Copy link
Collaborator

Can you explain the changes to bleedthrough and the low ink lines augmentations? The change to folding seems to fix the problem, good work

@kwcckw
Copy link
Collaborator Author

kwcckw commented Aug 24, 2021

Can you explain the changes to bleedthrough and the low ink lines augmentations? The change to folding seems to fix the problem, good work

For bleedthrough, there's chance image size and mask size is not the same, and this is causing error in the blending function. The possible cause is the small image size.

For folding, I can see sometimes the input image is in int instead of float or uint8. That will causing error in the warp perspective function so I added code to convert image to float.

For applyBlob , when image is too small, size[1] may smaller than size[0] due to the line of code below:

 size = (1, dim // 2 - 1)

This will causing error in the random.randint function when second number is smaller than first number.

Similarly with low ink random lines, the added code is to prevent second number is smaller than first number in the random.randint function.

For low ink periodic line, I added code to prevent zero division error. This can be happened when image size is too small.

Fix unsigned int overflow in remove_noise_fn
Copy link
Collaborator

@proofconstruction proofconstruction left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Nice work on the bug fixes!

@proofconstruction proofconstruction merged commit 37206ca into sparkfish:dev Aug 25, 2021
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

2 participants