GameSentenceMiner 2.13.5.post1__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.
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/ocr.py +17 -11
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/run.py +250 -177
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/PKG-INFO +1 -1
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/PKG-INFO +1 -1
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/pyproject.toml +1 -1
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/ai/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/ai/ai_prompting.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/anki.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon128.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon256.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon32.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon512.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/icon64.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/assets/pickaxe.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/config_gui.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/gametext.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/gsm.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/locales/en_us.json +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/locales/ja_jp.json +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/locales/zh_cn.json +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/obs.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/gsm_ocr_config.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/ocrconfig.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/owocr_area_selector.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/owocr_helper.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/ocr/ss_picker.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/__main__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/config.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/lens_betterproto.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/audio_offset_selector.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/communication/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/communication/send.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/communication/websocket.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/configuration.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/downloader/Untitled_json.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/downloader/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/downloader/download_tools.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/downloader/oneocr_dl.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/electron_config.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/ffmpeg.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/gsm_utils.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/model.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/notification.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/package.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/ss_selector.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/text_log.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/util/window_transparency.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/vad.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/service.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/apple-touch-icon.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/favicon-96x96.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/favicon.ico +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/favicon.svg +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/site.webmanifest +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/style.css +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/web-app-manifest-192x192.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/static/web-app-manifest-512x512.png +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/templates/__init__.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/templates/index.html +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/templates/text_replacements.html +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/templates/utility.html +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/web/texthooking_page.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/wip/get_overlay_coords.py +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/SOURCES.txt +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/dependency_links.txt +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/entry_points.txt +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/requires.txt +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner.egg-info/top_level.txt +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/LICENSE +0 -0
- {gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/setup.cfg +0 -0
{gamesentenceminer-2.13.5.post1 → gamesentenceminer-2.13.7}/GameSentenceMiner/owocr/owocr/ocr.py
RENAMED
@@ -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 = '
|
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
|
-
#
|
1380
|
-
#
|
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(
|
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:
|