-
Notifications
You must be signed in to change notification settings - Fork 21
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
[Enhancement request]H3C can't be reconginized well. #8
Comments
Thank you for submitting this! Binarization is something that we’re continuing to improve. We will add this images into our test suite and we’ll see if we can tweak our existing approach to correctly handle this image while still maintaining overall performance. We will keep this ticket open until it is fixed and pushed to Maven Central |
@kongwf5813 the current master branch includes this test image, which now seems to work okay. This code has some modifications to the grayscaling procedure that seem to make it handle things like this a little better. The previous default grayscale code took a weighted average of RGB to match the "luminance" calculations typically applied in most software (equivalent to equation 7 here https://openaccess.thecvf.com/content_cvpr_2017/papers/Nguyen_Why_You_Should_CVPR_2017_paper.pdf). While this approach should typically work well, MolVec has a strange quirk where it first inverts the colors of the images, and then performs the grayscale and thresholding. There is an inherent bias to consider black pixels "off" and white pixels "on" in a few steps. Due to MolVec using the negative image for grayscale/thresholding, converting to HSV space and simply using the "Value" component actually does a decent job of promoting "foreground" elements in a colored image like the one you present. Please try it out and let us know! Ultimately, these thresholding and grayscale operations could be improved using other techniques. If you've got more examples of images that aren't working well, we could add them to the training set and try to adjust a few things. Eventually there may need to be a larger decision tree on which grayscale/thresholding technique to use based on more heuristics. A sharpenImage method like the one you suggest could be great to handle some of these edge case too! |
These changes have been released in 0.9.8. closing ticket. Thanks for your help making Molvec better! |
First, thank you all of guys. You developed a very good tool.
I tested it today, found two things:
I saw in the StructureImageExtractor class, the colored image would be converted to gray one, some color in original image might be white after this operation. That's why the ouput of black one(I produced) is better than colored one.
I produced the black one by using below code:
Please let me know if this two things would be considered.
The text was updated successfully, but these errors were encountered: