D1firehail / AdeptiScanner-GI

OCR-based inventory scanner for Genshin Impact
53 stars 18 forks source link

Scanning stops due to duplicates #24

Open aisalexa666 opened 14 hours ago

aisalexa666 commented 14 hours ago

Greetings, During a scan I get a duplicate message and the scan completes well before the end. I do have duplicates in my inventory - this is not a bug.

Starting auto-run. ---Press ESCAPE to pause---
Duplicate artifact found, stopping after this screen
Scanning complete, awaiting results
Time elapsed: 152537ms
Auto finished
 Good results: 799, Bad results: 0
Time elapsed: 153555ms

All bad results displayed
Time elapsed: 153560ms

Version: Program: 2.3.0 / Data: 5.2b

Procedure:

  1. Start the game, switch to eng, prepare for scanning.
  2. I run “AdeptiScanner GI.exe” with administrator rights.
  3. I click “Capture”. I make sure that everything works correctly
  4. I press “Start Auto”

I'm attaching a screenshot of the artifacts in the inventory Is there any way to disable duplicate scanning? Or not complete the scan?

20241123T172727_2560_1440_Genshin_Impact 20241123T172729_2560_1440_Genshin_Impact

Translated with DeepL.com (free version)

D1firehail commented 14 hours ago

You can simply scroll down to the next full screen of artifacts and press "Start Auto" again. I could probably change it so it requires multiple duplicates in a row to stop, to reduce false positives.

aisalexa666 commented 14 hours ago

Thanks for the quick reply

I think still adding a checkbox “stop scanning when duplicates are detected” would be a better solution. (I had at least 2 pairs of similar artifacts in my inventory. There are probably more of these duplicates as well)

I have a question about screen scrolling - if you do it this way - in the final json will the artifacts be duplicated (as they are in the inventory)? Or will they be in a single instance?

D1firehail commented 13 hours ago

Looking at it again, I think you might have missed step 2 of "How to prepare for scanning". Since the artifacts are equipped to different characters, they should not have been identified as duplicates. The best explanation for that would be the equipped character row not being in the image taken by the scanner.

Duplicates are the most reliable way to know the bottom has been reached, so I won't add a a checkbox to ignore that. Making the check a bit smarter would be more reliable and more convenient.

Duplicate artifacts found during the same run of Auto will only result in 1 copy being added. If they come from manual scan or separate runs of Auto, multiple copies can be added. Weapon mode has no duplicate protections in Auto mode, since duplicate weapons is common.