-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Request: Good Affix Roll Marker #64
Comments
Thanks for the suggestion. With the current implementation, using images to detect affixes this is not possible. However, it is likely that I change this to OCR in the future. Everything will be converted to text then. I have currently no idea if OCR will be fast enough for the overlay. So no promises yet I'll implement this. |
maybe consider using tesseract for OCR. From a quick test using the example image from readme with tesseract on a rather old system it took 0.04 to 0.3 seconds to run the text recognition on the whole image:
Results might could be further improved by not feeding the whole item at once and splitting it up in different chunks. There are problems detection the Diablo Style "O" (used in item name only i think) and a few other characters (like affix markers etc) but that could simply be ignored / cutoff |
Sounds promising, and yes was planning to use tesseract. Still looking for a C# implementation though.
Does it really vary that much? 0.3 sec would be way too slow to be useful. Version 2.0 of the app is already designed with OCR in mind. Each affix and aspect has it's own region in the app. That should help getting the processing time down to a minimum. I'll get to implementing OCR eventually, but not anytime soon. |
Someone wrote something in python. For the sake eliminating a C# implement, you could work from here: This is also written in C# (might be able to borrow some code): This library may even be of use, particularly the trained dataset: |
Thanks for the examples. But I think I have already found an OCR lib I'm going to use: The one from the VersaLootFilterD4 uses IronOCR, it's too expensive to use (https://ironsoftware.com/csharp/ocr/licensing/). The complete Diablo4Companion project is in C#, so I'm not planning to switch to another language. But it can always be interesting to look at implementations in other languages. Regarding the trained dataset that is probably just the default from tesseract? |
Jos, I wasn't aware Versa was using Iron, but Tesseract does work quite well and is utilized by the Sanctuary Team for diablo.trade. It does make occasional mistakes, however, which is why I presumed training was required to minimize error or allow for detection of OCR error, i.e. with a model knowing a given affix has to be within a particular numerical range and so forth. With respect to implementation, I'm not sure if they trained their model to do so or have it hardcoded in. Judging from what I've seen of other OCR implementations for such an application, particularly loot filters, they trained their own models specifically for D4. Beyond this, I look forward to your implementation of OCR and the changes to come to the UI, especially for setting min values. At present, I've been bouncing between your application and Aeon0's D4LF, which has some extra features for marking your loot as trash or favorite, but has no UI and requires a few YAML edits, which can be somewhat inconvenient or render the application unusable for the average person. All the best, |
First step is done, v3 is now available for download. Detection now works with OCR. |
This will be added with the v4 release when season 6 starts. |
An additional highlight marker if an Affix roll is good.
For exaple, the # mana Affix can roll from 3 – 9 . If the Affix roll is >7 then add another identifier.
So with the existing Diablo4Companion format you could add another dot marker if the roll is good.
Just an idea.
Thanks
The text was updated successfully, but these errors were encountered: