GameSentenceMiner 2.13.6__tar.gz → 2.13.7__tar.gz

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.
Files changed (79) hide show
  1. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/ocr.py +17 -11
  2. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/run.py +248 -177
  3. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/PKG-INFO +1 -1
  4. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/PKG-INFO +1 -1
  5. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/pyproject.toml +1 -1
  6. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/__init__.py +0 -0
  7. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/ai/__init__.py +0 -0
  8. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/ai/ai_prompting.py +0 -0
  9. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/anki.py +0 -0
  10. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/__init__.py +0 -0
  11. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon.png +0 -0
  12. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon128.png +0 -0
  13. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon256.png +0 -0
  14. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon32.png +0 -0
  15. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon512.png +0 -0
  16. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon64.png +0 -0
  17. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/pickaxe.png +0 -0
  18. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/config_gui.py +0 -0
  19. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/gametext.py +0 -0
  20. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/gsm.py +0 -0
  21. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/locales/en_us.json +0 -0
  22. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/locales/ja_jp.json +0 -0
  23. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/locales/zh_cn.json +0 -0
  24. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/obs.py +0 -0
  25. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/__init__.py +0 -0
  26. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/gsm_ocr_config.py +0 -0
  27. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/ocrconfig.py +0 -0
  28. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/owocr_area_selector.py +0 -0
  29. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/owocr_helper.py +0 -0
  30. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/ss_picker.py +0 -0
  31. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/__init__.py +0 -0
  32. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/__main__.py +0 -0
  33. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/config.py +0 -0
  34. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/lens_betterproto.py +0 -0
  35. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py +0 -0
  36. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/__init__.py +0 -0
  37. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/audio_offset_selector.py +0 -0
  38. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/communication/__init__.py +0 -0
  39. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/communication/send.py +0 -0
  40. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/communication/websocket.py +0 -0
  41. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/configuration.py +0 -0
  42. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/downloader/Untitled_json.py +0 -0
  43. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/downloader/__init__.py +0 -0
  44. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/downloader/download_tools.py +0 -0
  45. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/downloader/oneocr_dl.py +0 -0
  46. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/electron_config.py +0 -0
  47. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/ffmpeg.py +0 -0
  48. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/gsm_utils.py +0 -0
  49. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/model.py +0 -0
  50. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/notification.py +0 -0
  51. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/package.py +0 -0
  52. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/ss_selector.py +0 -0
  53. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/text_log.py +0 -0
  54. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/window_transparency.py +0 -0
  55. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/vad.py +0 -0
  56. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/__init__.py +0 -0
  57. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/service.py +0 -0
  58. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/__init__.py +0 -0
  59. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/apple-touch-icon.png +0 -0
  60. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/favicon-96x96.png +0 -0
  61. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/favicon.ico +0 -0
  62. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/favicon.svg +0 -0
  63. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/site.webmanifest +0 -0
  64. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/style.css +0 -0
  65. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/web-app-manifest-192x192.png +0 -0
  66. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/web-app-manifest-512x512.png +0 -0
  67. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/templates/__init__.py +0 -0
  68. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/templates/index.html +0 -0
  69. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/templates/text_replacements.html +0 -0
  70. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/templates/utility.html +0 -0
  71. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/texthooking_page.py +0 -0
  72. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner/wip/get_overlay_coords.py +0 -0
  73. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/SOURCES.txt +0 -0
  74. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/dependency_links.txt +0 -0
  75. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/entry_points.txt +0 -0
  76. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/requires.txt +0 -0
  77. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/top_level.txt +0 -0
  78. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/LICENSE +0 -0
  79. {gamesentenceminer-2.13.6 → gamesentenceminer-2.13.7}/setup.cfg +0 -0
@@ -1368,37 +1368,40 @@ class GroqOCR:
1368
1368
  return base64.b64encode(pil_image_to_bytes(img, png_compression=1)).decode('utf-8')
1369
1369
 
1370
1370
  # class QWENOCR:
1371
- # name = 'qwenvl'
1371
+ # name = 'qwenv2'
1372
1372
  # readable_name = 'Qwen2-VL'
1373
1373
  # key = 'q'
1374
1374
  # available = False
1375
- #
1375
+
1376
1376
  # def __init__(self, config={}, lang='ja'):
1377
1377
  # try:
1378
1378
  # import torch
1379
- # from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
1380
- # self.model = Qwen2VLForConditionalGeneration.from_pretrained(
1379
+ # import transformers
1380
+ # from transformers import AutoModelForImageTextToText, AutoProcessor
1381
+ # self.model = AutoModelForImageTextToText.from_pretrained(
1381
1382
  # "Qwen/Qwen2-VL-2B-Instruct", torch_dtype="auto", device_map="auto"
1382
1383
  # )
1383
1384
  # self.processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", use_fast=True)
1384
1385
  # self.device = "cuda" if torch.cuda.is_available() else "cpu"
1385
1386
  # print(self.device)
1386
1387
  # self.available = True
1387
- # logger.info('Qwen2-VL ready')
1388
+ # logger.info('Qwen2.5-VL ready')
1388
1389
  # except Exception as e:
1389
1390
  # logger.warning(f'Qwen2-VL not available: {e}')
1390
- #
1391
+
1391
1392
  # def __call__(self, img, furigana_filter_sensitivity=0):
1392
1393
  # if not self.available:
1393
1394
  # return (False, 'Qwen2-VL is not available.')
1394
1395
  # try:
1395
- # img = input_to_pil_image(img)
1396
+ # img, is_path = input_to_pil_image(img)
1397
+
1398
+ # # img.show()
1396
1399
  # conversation = [
1397
1400
  # {
1398
1401
  # "role": "user",
1399
1402
  # "content": [
1400
1403
  # {"type": "image"},
1401
- # {"type": "text", "text": "Analyze the image. Extract text *only* from within dialogue boxes (speech bubbles or panels containing character dialogue). If Text appears to be vertical, read the text from top to bottom, right to left. From the extracted dialogue text, filter out any furigana. Ignore and do not include any text found outside of dialogue boxes, including character names, speaker labels, or sound effects. Return *only* the filtered dialogue text. If no text is found within dialogue boxes after applying filters, return nothing. Do not include any other output, formatting markers, or commentary."},
1404
+ # {"type": "text", "text": "Analyze the image. Extract text *only* from within dialogue boxes (speech bubbles or panels containing character dialogue). If Text appears to be vertical, read the text from top to bottom, right to left. From the extracted dialogue text, filter out any furigana (Small characters above the kanji). Ignore and do not include any text found outside of dialogue boxes, including character names, speaker labels, or sound effects. Return *only* the filtered dialogue text. If no text is found within dialogue boxes after applying filters, return nothing. Do not include any other output, formatting markers, or commentary."},
1402
1405
  # ],
1403
1406
  # }
1404
1407
  # ]
@@ -1418,15 +1421,18 @@ class GroqOCR:
1418
1421
  # return (True, output_text[0] if output_text else "")
1419
1422
  # except Exception as e:
1420
1423
  # return (False, f'Qwen2-VL inference failed: {e}')
1424
+
1425
+ # def _preprocess(self, img):
1426
+ # return base64.b64encode(pil_image_to_bytes(img, png_compression=6)).decode('utf-8')
1421
1427
 
1422
1428
 
1423
1429
  # qwenocr = QWENOCR()
1424
- #
1430
+
1425
1431
  # for i in range(10):
1426
1432
  # start_time = time.time()
1427
- # res, text = qwenocr(Image.open('test_furigana.png'), furigana_filter_sensitivity=0) # Example usage
1433
+ # res, text = qwenocr(Image.open(r"C:\Users\Beangate\GSM\GameSentenceMiner\GameSentenceMiner\owocr\owocr\test_furigana.png"), furigana_filter_sensitivity=0) # Example usage
1428
1434
  # end_time = time.time()
1429
- #
1435
+
1430
1436
  # print(f"Time taken: {end_time - start_time:.2f} seconds")
1431
1437
  # print(text)
1432
1438
  # class LocalOCR: