keras-io icon indicating copy to clipboard operation
keras-io copied to clipboard

examples/vision/image_enhancer.py

Open anish9 opened this issue 2 years ago • 21 comments

anish9 avatar Jan 04 '22 08:01 anish9

Thanks for adding the text copy! It looks like the text copy is going to need further work and proofreading. Is there someone else you'd be able to ask for help with it?

Thanks for adding the text copy! It looks like the text copy is going to need further work and proofreading. Is there someone else you'd be able to ask for help with it?

@fchollet If you can suggest an expert I can associate to make it better !

anish9 avatar Jan 10 '22 03:01 anish9

@fchollet The objective that holds this as an example is improvements in OCR engines accuracy. When direct image is passed through OCR(tesseract), it tends to read poorly, while passing through our model and then through OCR engine it leads to restore corrupt characters at significant level. So, if I can add that metrics like (character error rate/word error rate)it would be more better example. your thoughts?

anish9 avatar Jan 10 '22 03:01 anish9

@anish9 would you mind sharing a colab file of your contribution? It'd be useful.

innat avatar Jan 25 '22 16:01 innat

@anish9 would you mind sharing a colab file of your contribution? It'd be useful.

@innat https://colab.research.google.com/drive/1KOEc1Zkeo9EUfeOILcBb-so9FV4v6LB3?usp=sharing

anish9 avatar Jan 26 '22 16:01 anish9

@anish9 would you mind sharing a colab file of your contribution? It'd be useful.

@innat colab.research.google.com/drive/1KOEc1Zkeo9EUfeOILcBb-so9FV4v6LB3?usp=sharing

@anish9 I couldn't successfully run your code on colab (GPU). It crashes in the middle of the first epoch. Can you please re-check the file?

innat avatar Jan 27 '22 18:01 innat

@anish9 would you mind sharing a colab file of your contribution? It'd be useful.

@innat colab.research.google.com/drive/1KOEc1Zkeo9EUfeOILcBb-so9FV4v6LB3?usp=sharing

@anish9 I couldn't successfully run your code on colab (GPU). It crashes in the middle of the first epoch. Can you please re-check the file?

@innat, There was an issue with cache in TF data pipeline which caused the RAM crash in colab, please remove the cache

check again : https://colab.research.google.com/drive/1KOEc1Zkeo9EUfeOILcBb-so9FV4v6LB3?usp=sharing

anish9 avatar Jan 28 '22 06:01 anish9

@innat please review the updated changes

anish9 avatar Jan 28 '22 09:01 anish9

@anish9 I tried to run the colab on GPU. But for it takes too much time to complete per epoch (~500s). Is it expected?

innat avatar Jan 28 '22 12:01 innat

@anish9 I tried to run the colab on GPU. But for it takes too much time to complete per epoch (~500s). Is it expected?

@innat it varies based on GPU hardware, yeah in colab it's taking long ...

anish9 avatar Jan 28 '22 13:01 anish9

@anish9 Thanks for making this nice tutorial on such a challenging problem. I can relate. It would be a nice starter for the interested practitioners in the OCR domain. And thanks for giving me the opportunity to share some of our opinions regarding your submission. I believe it becomes much better in a sense by following most of the contribution guidelines. 👍

innat avatar Feb 02 '22 13:02 innat

@fchollet could you please take look into this submission now?

innat avatar Feb 02 '22 13:02 innat

@anish9 Thanks for making this nice tutorial on such a challenging problem. I can relate. It would be a nice starter for the interested practitioners in the OCR domain. And thanks for giving me the opportunity to share some of our opinions regarding your submission. I believe it becomes much better in a sense by following most of the contribution guidelines. +1

@innat, Thanks for spending your time on it, your feedbacks were helpful!

anish9 avatar Feb 02 '22 17:02 anish9

@fchollet, please review this example

anish9 avatar Feb 27 '22 08:02 anish9

@anish9 there is a batch of outstanding comments from the last round of reviews that still need to be addressed, hence why I haven't reviewed yet. Please take a look. In addition, the text copy would still need significant improvements -- can you find someone who could help you on that front?

fchollet avatar Feb 27 '22 23:02 fchollet

@fchollet I would need someones help since i am relatively new to this,

anish9 avatar Feb 28 '22 08:02 anish9

@anish9 Let me know if you need any assistance here.

innat avatar Apr 04 '22 12:04 innat

@anish9 Let me know if you need any assistance here.

@innat, yes it would be nice if you can help me in the docs.

anish9 avatar Apr 04 '22 14:04 anish9

@anish9 (cc. @fchollet ) I think you should not depend on pytesseract and fastwer to compute the word error rate. Instead, you should implement a similar thing in tensorflow. Some pointer. Otherwise, it might be a bad UX to restart the kernel on colab for these packages' installation and non-agnostic path dependencies of pytesseract in all OS. Please consider fixing this. I will send a colab file with the required modification then.

innat avatar Apr 15 '22 13:04 innat

@innat I ain't sure about an alternative to tesseract, especially considering their performance for document OCR, the novel objective was not about performance but driving exposure on how the model is useful for users in one of the real-world use-case and definitely this is not the only use case.

anish9 avatar May 06 '22 18:05 anish9

You're right. But if I remember correctly, it's required to restart the kernel after installing these packages to load properly, which I think is not pleasant (bad UX) and may not follow the design guideline.

Also, I was not suggesting finding the equivalent of tesseract in tensorflow/keras but the relevant functionality. You're working on this, so if you think some component (metric/loss/layer) is missing regarding OCR and very impactful in practice, I would highly encourage you to raise a ticket on GitHub for that (for example. in keras-cv). What do you think?

innat avatar May 06 '22 19:05 innat

@innat yes, will be valuable for the community, we can raise a ticket!

anish9 avatar May 09 '22 05:05 anish9

@anish9 Thanks again for this PR. It looks like it's been more than a year since we've heard from you. Are you still working on this? Please let us know. Otherwise we'll close the request. Thanks!

pcoet avatar Aug 14 '23 16:08 pcoet