GameSentenceMiner 2.16.9__py3-none-any.whl → 2.16.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of GameSentenceMiner might be problematic. Click here for more details.
- GameSentenceMiner/util/get_overlay_coords.py +19 -16
- {gamesentenceminer-2.16.9.dist-info → gamesentenceminer-2.16.10.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.16.9.dist-info → gamesentenceminer-2.16.10.dist-info}/RECORD +7 -7
- {gamesentenceminer-2.16.9.dist-info → gamesentenceminer-2.16.10.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.16.9.dist-info → gamesentenceminer-2.16.10.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.16.9.dist-info → gamesentenceminer-2.16.10.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.16.9.dist-info → gamesentenceminer-2.16.10.dist-info}/top_level.txt +0 -0
|
@@ -154,9 +154,9 @@ class OverlayProcessor:
|
|
|
154
154
|
"""
|
|
155
155
|
Sends the detected text boxes to the overlay via WebSocket.
|
|
156
156
|
"""
|
|
157
|
-
|
|
158
|
-
logger.info(f"Sending {len(boxes)} boxes to overlay.")
|
|
159
|
-
await send_word_coordinates_to_overlay(boxes)
|
|
157
|
+
await self.find_box_for_sentence(sentence_to_check)
|
|
158
|
+
# logger.info(f"Sending {len(boxes)} boxes to overlay.")
|
|
159
|
+
# await send_word_coordinates_to_overlay(boxes)
|
|
160
160
|
|
|
161
161
|
async def find_box_for_sentence(self, sentence_to_check: str = None) -> List[Dict[str, Any]]:
|
|
162
162
|
"""
|
|
@@ -284,6 +284,18 @@ class OverlayProcessor:
|
|
|
284
284
|
return_one_box=False,
|
|
285
285
|
furigana_filter_sensitivity=None, # Disable furigana filtering
|
|
286
286
|
)
|
|
287
|
+
|
|
288
|
+
logger.info("Sending OneOCR results to overlay.")
|
|
289
|
+
await send_word_coordinates_to_overlay(oneocr_results)
|
|
290
|
+
|
|
291
|
+
# If User Home is beangate
|
|
292
|
+
if is_beangate:
|
|
293
|
+
with open("oneocr_results.json", "w", encoding="utf-8") as f:
|
|
294
|
+
f.write(json.dumps(oneocr_results, ensure_ascii=False, indent=2))
|
|
295
|
+
|
|
296
|
+
if get_config().overlay.engine == OverlayEngine.ONEOCR.value and self.oneocr:
|
|
297
|
+
logger.info("Using OneOCR results for overlay as configured.")
|
|
298
|
+
return
|
|
287
299
|
|
|
288
300
|
# 3. Create a composite image with only the detected text regions
|
|
289
301
|
composite_image = self._create_composite_image(
|
|
@@ -294,15 +306,6 @@ class OverlayProcessor:
|
|
|
294
306
|
)
|
|
295
307
|
else:
|
|
296
308
|
composite_image = full_screenshot
|
|
297
|
-
|
|
298
|
-
# If User Home is beangate
|
|
299
|
-
if is_beangate:
|
|
300
|
-
with open("oneocr_results.json", "w", encoding="utf-8") as f:
|
|
301
|
-
f.write(json.dumps(oneocr_results, ensure_ascii=False, indent=2))
|
|
302
|
-
|
|
303
|
-
if get_config().overlay.engine == OverlayEngine.ONEOCR.value and self.oneocr:
|
|
304
|
-
logger.info("Using OneOCR results for overlay as configured.")
|
|
305
|
-
return oneocr_results
|
|
306
309
|
|
|
307
310
|
# 4. Use Google Lens on the cleaner composite image for higher accuracy
|
|
308
311
|
res = self.lens(
|
|
@@ -312,12 +315,12 @@ class OverlayProcessor:
|
|
|
312
315
|
)
|
|
313
316
|
|
|
314
317
|
if len(res) != 3:
|
|
315
|
-
return
|
|
318
|
+
return
|
|
316
319
|
|
|
317
320
|
_, _, coords = res
|
|
318
321
|
|
|
319
322
|
if not res or not coords:
|
|
320
|
-
return
|
|
323
|
+
return
|
|
321
324
|
|
|
322
325
|
# 5. Process the high-accuracy results into the desired format
|
|
323
326
|
extracted_data = self._extract_text_with_pixel_boxes(
|
|
@@ -330,8 +333,8 @@ class OverlayProcessor:
|
|
|
330
333
|
crop_height=composite_image.height,
|
|
331
334
|
use_percentages=True
|
|
332
335
|
)
|
|
333
|
-
|
|
334
|
-
|
|
336
|
+
logger.info("Sending Google Lens results to overlay.")
|
|
337
|
+
await send_word_coordinates_to_overlay(extracted_data)
|
|
335
338
|
|
|
336
339
|
def _extract_text_with_pixel_boxes(
|
|
337
340
|
self,
|
|
@@ -41,7 +41,7 @@ GameSentenceMiner/util/configuration.py,sha256=qATOwZahVQNP8-ZnWiAKuR7UJLW25QNDm
|
|
|
41
41
|
GameSentenceMiner/util/db.py,sha256=B2Qwg7i0Qn_yxov-NhcT9QdFkF218Cqea_V7ZPzYBzM,21365
|
|
42
42
|
GameSentenceMiner/util/electron_config.py,sha256=KfeJToeFFVw0IR5MKa-gBzpzaGrU-lyJbR9z-sDEHYU,8767
|
|
43
43
|
GameSentenceMiner/util/ffmpeg.py,sha256=g3v1aJnv3qWekDnO0FdYozB-MG9di4WUvPA3NyXY9Ws,28998
|
|
44
|
-
GameSentenceMiner/util/get_overlay_coords.py,sha256=
|
|
44
|
+
GameSentenceMiner/util/get_overlay_coords.py,sha256=pkG8_3l3fuhm3DzFLuNwSeaYTkRMtyU3O7DB6s372QM,18961
|
|
45
45
|
GameSentenceMiner/util/gsm_utils.py,sha256=Piwv88Q9av2LBeN7M6QDi0Mp0_R2lNbkcI6ekK5hd2o,11851
|
|
46
46
|
GameSentenceMiner/util/model.py,sha256=R-_RYTYLSDNgBoVTPuPBcIHeOznIqi_vBzQ7VQ20WYk,6727
|
|
47
47
|
GameSentenceMiner/util/notification.py,sha256=YBhf_mSo_i3cjBz-pmeTPx3wchKiG9BK2VBdZSa2prQ,4597
|
|
@@ -90,9 +90,9 @@ GameSentenceMiner/web/templates/utility.html,sha256=KtqnZUMAYs5XsEdC9Tlsd40NKAVi
|
|
|
90
90
|
GameSentenceMiner/web/templates/components/navigation.html,sha256=6y9PvM3nh8LY6JWrZb6zVOm0vqkBLDc6d3gB9X5lT_w,1055
|
|
91
91
|
GameSentenceMiner/web/templates/components/theme-styles.html,sha256=hiq3zdJljpRjQO1iUA7gfFKwXebltG-IWW-gnKS4GHA,3439
|
|
92
92
|
GameSentenceMiner/wip/__init___.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
93
|
-
gamesentenceminer-2.16.
|
|
94
|
-
gamesentenceminer-2.16.
|
|
95
|
-
gamesentenceminer-2.16.
|
|
96
|
-
gamesentenceminer-2.16.
|
|
97
|
-
gamesentenceminer-2.16.
|
|
98
|
-
gamesentenceminer-2.16.
|
|
93
|
+
gamesentenceminer-2.16.10.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
94
|
+
gamesentenceminer-2.16.10.dist-info/METADATA,sha256=Ff8-eYZPNFr7d5G6U8Au0t774YuQDtHeWcMq0NVB5_4,7349
|
|
95
|
+
gamesentenceminer-2.16.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
96
|
+
gamesentenceminer-2.16.10.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
|
97
|
+
gamesentenceminer-2.16.10.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
|
98
|
+
gamesentenceminer-2.16.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|