This commit is contained in:
AGX 2025-07-04 14:19:24 +09:00
parent 57fa44b31b
commit 24f0b37f10
6 changed files with 151 additions and 7 deletions

View File

@ -304,3 +304,110 @@ RuntimeError: 이미지 저장 중 오류 발생: The truth value of an array wi
[2025-07-04 02:20:54,459] [MainThread] [INFO] [image_processor2.py:process_single_image:114] 텍스트 렌더링 완료
[2025-07-04 02:20:54,469] [MainThread] [INFO] [postImageManager.py:save_image_to_path:38] 이미지 저장 완료 : D:\py\IT_Server\temp_images\translated_multi_img_7.png
[2025-07-04 02:20:54,506] [MainThread] [INFO] [image_processor2.py:process_single_image:118] 이미지 7 번역 완료: D:\py\IT_Server\temp_images\translated_multi_img_7.png
[2025-07-04 09:18:48,438] [MainThread] [ERROR] [image_processor2.py:__init__:34] ❌ PaddleOCR 초기화 실패: No module named 'paddleocr'
Traceback (most recent call last):
File "/home/ckh08045/work/IT_Server/modules/ocr_module.py", line 31, in initialize_ocr
from paddleocr import PaddleOCR
ModuleNotFoundError: No module named 'paddleocr'
[2025-07-04 09:27:49,076] [MainThread] [INFO] [image_processor2.py:__init__:34] PaddleOCR use_gpu: False
[2025-07-04 09:27:50,652] [MainThread] [INFO] [main.py:main:38] 마스크 모듈 초기화 완료
[2025-07-04 09:27:50,653] [MainThread] [DEBUG] [image_processor2.py:__init__:37] 폰트 로드 성공: /home/ckh08045/work/IT_Server/modules/fonts/HakgyoansimDunggeunmisoTTFB.ttf
[2025-07-04 09:28:21,688] [MainThread] [ERROR] [image_translate_server.py:sem_task:81] 이미지 파일을 찾을 수 없습니다: ./img/4.jpg
[2025-07-04 09:28:21,689] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 0개 필터링 완료
[2025-07-04 09:28:21,690] [MainThread] [INFO] [events.py:_run:81] 이미지 1 중국어 텍스트 없음, 원본 이미지 반환
[2025-07-04 09:28:21,690] [MainThread] [ERROR] [image_translate_server.py:sem_task:81] 이미지 파일을 찾을 수 없습니다: ./img/5.jpg
[2025-07-04 09:28:21,690] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 0개 필터링 완료
[2025-07-04 09:28:21,691] [MainThread] [INFO] [events.py:_run:81] 이미지 2 중국어 텍스트 없음, 원본 이미지 반환
[2025-07-04 09:28:21,691] [MainThread] [ERROR] [image_translate_server.py:sem_task:81] 이미지 파일을 찾을 수 없습니다: ./img/7.jpg
[2025-07-04 09:28:21,691] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 0개 필터링 완료
[2025-07-04 09:28:21,692] [MainThread] [INFO] [events.py:_run:81] 이미지 3 중국어 텍스트 없음, 원본 이미지 반환
[2025-07-04 09:28:21,692] [MainThread] [ERROR] [image_translate_server.py:sem_task:81] 이미지 파일을 찾을 수 없습니다: ./img/1.jpg
[2025-07-04 09:28:21,692] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 0개 필터링 완료
[2025-07-04 09:28:21,692] [MainThread] [INFO] [events.py:_run:81] 이미지 4 중국어 텍스트 없음, 원본 이미지 반환
[2025-07-04 09:28:21,693] [MainThread] [ERROR] [image_translate_server.py:sem_task:81] 이미지 파일을 찾을 수 없습니다: ./img/6.jpg
[2025-07-04 09:28:21,693] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 0개 필터링 완료
[2025-07-04 09:28:21,693] [MainThread] [INFO] [events.py:_run:81] 이미지 5 중국어 텍스트 없음, 원본 이미지 반환
[2025-07-04 09:28:21,693] [MainThread] [ERROR] [image_translate_server.py:sem_task:81] 이미지 파일을 찾을 수 없습니다: ./img/2.jpg
[2025-07-04 09:28:21,694] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 0개 필터링 완료
[2025-07-04 09:28:21,694] [MainThread] [INFO] [events.py:_run:81] 이미지 6 중국어 텍스트 없음, 원본 이미지 반환
[2025-07-04 09:28:21,694] [MainThread] [ERROR] [image_translate_server.py:sem_task:81] 이미지 파일을 찾을 수 없습니다: ./img/3.jpg
[2025-07-04 09:28:21,695] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 0개 필터링 완료
[2025-07-04 09:28:21,695] [MainThread] [INFO] [events.py:_run:81] 이미지 7 중국어 텍스트 없음, 원본 이미지 반환
[2025-07-04 09:29:09,454] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 🔍 OCR 감지 방식: polygon
[2025-07-04 09:29:16,132] [MainThread] [INFO] [image_translate_server.py:sem_task:81] ocr_raw_results: [[[[[431.0, 71.0], [467.0, 71.0], [467.0, 86.0], [431.0, 86.0]], ('85°C', 0.8006035685539246)], [[[516.0, 69.0], [558.0, 69.0], [558.0, 88.0], [516.0, 88.0]], ('185°F', 0.9477267265319824)], [[[430.0, 138.0], [469.0, 138.0], [469.0, 156.0], [430.0, 156.0]], ('80℃', 0.9489307403564453)], [[[510.0, 138.0], [560.0, 136.0], [561.0, 154.0], [511.0, 156.0]], ('176F', 0.9774733781814575)], [[[431.0, 204.0], [487.0, 208.0], [486.0, 226.0], [430.0, 223.0]], ('70°℃', 0.8445404767990112)], [[[492.0, 208.0], [559.0, 204.0], [561.0, 222.0], [494.0, 226.0]], ('158F', 0.9599605798721313)], [[[430.0, 274.0], [469.0, 274.0], [469.0, 292.0], [430.0, 292.0]], ('60℃', 0.9590663313865662)], [[[508.0, 275.0], [560.0, 275.0], [560.0, 292.0], [508.0, 292.0]], ('140°F', 0.9507732391357422)], [[[431.0, 344.0], [467.0, 344.0], [467.0, 359.0], [431.0, 359.0]], ('50°C', 0.8583955764770508)], [[[514.0, 342.0], [560.0, 342.0], [560.0, 360.0], [514.0, 360.0]], ('122°F', 0.859941303730011)], [[[429.0, 412.0], [467.0, 409.0], [468.0, 428.0], [430.0, 431.0]], ('40C', 0.8281939029693604)], [[[515.0, 412.0], [559.0, 412.0], [559.0, 427.0], [515.0, 427.0]], ('104°F', 0.9546246528625488)], [[[24.0, 447.0], [227.0, 449.0], [226.0, 477.0], [24.0, 475.0]], ('精确的温度控制', 0.9948815107345581)], [[[25.0, 484.0], [262.0, 484.0], [262.0, 504.0], [25.0, 504.0]], ('温度范围从30℃至85℃', 0.9833760261535645)], [[[430.0, 480.0], [468.0, 480.0], [468.0, 497.0], [430.0, 497.0]], ('30°C', 0.7743632197380066)], [[[513.0, 480.0], [549.0, 480.0], [549.0, 497.0], [513.0, 497.0]], ('86°F', 0.9255774617195129)], [[[21.0, 514.0], [428.0, 512.0], [428.0, 536.0], [21.0, 538.0]], ('Temperature range from 86 F to 185°F', 0.9300525188446045)], [[[25.0, 542.0], [572.0, 543.0], [572.0, 570.0], [25.0, 569.0]], ('PRECISE TEMPERATURECONTROL', 0.9752768874168396)]]]
[2025-07-04 09:29:16,133] [MainThread] [INFO] [image_translate_server.py:sem_task:81] line: [[[[431.0, 71.0], [467.0, 71.0], [467.0, 86.0], [431.0, 86.0]], ('85°C', 0.8006035685539246)], [[[516.0, 69.0], [558.0, 69.0], [558.0, 88.0], [516.0, 88.0]], ('185°F', 0.9477267265319824)], [[[430.0, 138.0], [469.0, 138.0], [469.0, 156.0], [430.0, 156.0]], ('80℃', 0.9489307403564453)], [[[510.0, 138.0], [560.0, 136.0], [561.0, 154.0], [511.0, 156.0]], ('176F', 0.9774733781814575)], [[[431.0, 204.0], [487.0, 208.0], [486.0, 226.0], [430.0, 223.0]], ('70°℃', 0.8445404767990112)], [[[492.0, 208.0], [559.0, 204.0], [561.0, 222.0], [494.0, 226.0]], ('158F', 0.9599605798721313)], [[[430.0, 274.0], [469.0, 274.0], [469.0, 292.0], [430.0, 292.0]], ('60℃', 0.9590663313865662)], [[[508.0, 275.0], [560.0, 275.0], [560.0, 292.0], [508.0, 292.0]], ('140°F', 0.9507732391357422)], [[[431.0, 344.0], [467.0, 344.0], [467.0, 359.0], [431.0, 359.0]], ('50°C', 0.8583955764770508)], [[[514.0, 342.0], [560.0, 342.0], [560.0, 360.0], [514.0, 360.0]], ('122°F', 0.859941303730011)], [[[429.0, 412.0], [467.0, 409.0], [468.0, 428.0], [430.0, 431.0]], ('40C', 0.8281939029693604)], [[[515.0, 412.0], [559.0, 412.0], [559.0, 427.0], [515.0, 427.0]], ('104°F', 0.9546246528625488)], [[[24.0, 447.0], [227.0, 449.0], [226.0, 477.0], [24.0, 475.0]], ('精确的温度控制', 0.9948815107345581)], [[[25.0, 484.0], [262.0, 484.0], [262.0, 504.0], [25.0, 504.0]], ('温度范围从30℃至85℃', 0.9833760261535645)], [[[430.0, 480.0], [468.0, 480.0], [468.0, 497.0], [430.0, 497.0]], ('30°C', 0.7743632197380066)], [[[513.0, 480.0], [549.0, 480.0], [549.0, 497.0], [513.0, 497.0]], ('86°F', 0.9255774617195129)], [[[21.0, 514.0], [428.0, 512.0], [428.0, 536.0], [21.0, 538.0]], ('Temperature range from 86 F to 185°F', 0.9300525188446045)], [[[25.0, 542.0], [572.0, 543.0], [572.0, 570.0], [25.0, 569.0]], ('PRECISE TEMPERATURECONTROL', 0.9752768874168396)]]
[2025-07-04 09:29:16,134] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 2개 필터링 완료
[2025-07-04 09:29:20,580] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 최종 치환 결과: ['85°C', '185°F', '80℃', '176F', '70°℃', '158F', '60℃', '140°F', '50°C', '122°F', '40C', '104°F', '정확한 온도 조절', '온도 범위는 30℃에서 85℃까지입니다', '30°C', '86°F', '온도 범위는 86°F에서 185°F까지입니다', '정확한 온도 조절']
[2025-07-04 09:29:20,580] [MainThread] [INFO] [events.py:_run:81] 이미지 1 치환됨
[2025-07-04 09:29:20,606] [MainThread] [INFO] [events.py:_run:81] 마스크 생성 완료
[2025-07-04 09:29:38,692] [MainThread] [INFO] [events.py:_run:81] 인페인팅 완료
[2025-07-04 09:29:39,048] [MainThread] [INFO] [events.py:_run:81] 텍스트 렌더링 완료
[2025-07-04 09:29:39,095] [MainThread] [INFO] [image_processor2.py:process_single_image:117] 이미지 저장 완료 : /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_1.png
[2025-07-04 09:29:39,273] [MainThread] [INFO] [events.py:_run:81] 이미지 1 번역 완료: /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_1.png
[2025-07-04 09:29:39,295] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 🔍 OCR 감지 방식: polygon
[2025-07-04 09:29:41,939] [MainThread] [INFO] [image_translate_server.py:sem_task:81] ocr_raw_results: [[[[[339.0, 103.0], [855.0, 103.0], [855.0, 182.0], [339.0, 182.0]], ('现代极简风格', 0.9964838027954102)], [[[235.0, 219.0], [963.0, 219.0], [963.0, 279.0], [235.0, 279.0]], ('更易搭配各种使用场景', 0.9974350929260254)], [[[478.0, 727.0], [649.0, 727.0], [649.0, 762.0], [478.0, 762.0]], ('★WELCOME', 0.8576079607009888)], [[[407.0, 760.0], [724.0, 760.0], [724.0, 855.0], [407.0, 855.0]], ('欢迎光临', 0.999948263168335)], [[[473.0, 856.0], [624.0, 863.0], [623.0, 898.0], [471.0, 891.0]], ('限时促销礼惠全城', 0.9319617748260498)], [[[446.0, 947.0], [640.0, 962.0], [638.0, 995.0], [443.0, 980.0]], ('满499减200/满999减500', 0.927433431148529)], [[[481.0, 980.0], [595.0, 991.0], [592.0, 1016.0], [479.0, 1005.0]], ('动的间167', 0.7950097918510437)]]]
[2025-07-04 09:29:41,940] [MainThread] [INFO] [image_translate_server.py:sem_task:81] line: [[[[339.0, 103.0], [855.0, 103.0], [855.0, 182.0], [339.0, 182.0]], ('现代极简风格', 0.9964838027954102)], [[[235.0, 219.0], [963.0, 219.0], [963.0, 279.0], [235.0, 279.0]], ('更易搭配各种使用场景', 0.9974350929260254)], [[[478.0, 727.0], [649.0, 727.0], [649.0, 762.0], [478.0, 762.0]], ('★WELCOME', 0.8576079607009888)], [[[407.0, 760.0], [724.0, 760.0], [724.0, 855.0], [407.0, 855.0]], ('欢迎光临', 0.999948263168335)], [[[473.0, 856.0], [624.0, 863.0], [623.0, 898.0], [471.0, 891.0]], ('限时促销礼惠全城', 0.9319617748260498)], [[[446.0, 947.0], [640.0, 962.0], [638.0, 995.0], [443.0, 980.0]], ('满499减200/满999减500', 0.927433431148529)], [[[481.0, 980.0], [595.0, 991.0], [592.0, 1016.0], [479.0, 1005.0]], ('动的间167', 0.7950097918510437)]]
[2025-07-04 09:29:41,940] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 6개 필터링 완료
[2025-07-04 09:29:44,107] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 최종 치환 결과: ['현대 미니멀 스타일', '다양한 사용 상황에 더 쉽게 어울립니다', '★환영합니다', '환영합니다', '한정 시간 프로모션, 전 도시 할인', '499원 이상 구매 시 200원 할인 / 999원 이상 구매 시 500원 할인', '동의 간167']
[2025-07-04 09:29:44,108] [MainThread] [INFO] [events.py:_run:81] 이미지 2 치환됨
[2025-07-04 09:29:44,149] [MainThread] [INFO] [events.py:_run:81] 마스크 생성 완료
[2025-07-04 09:30:33,009] [MainThread] [INFO] [events.py:_run:81] 인페인팅 완료
[2025-07-04 09:30:33,349] [MainThread] [INFO] [events.py:_run:81] 텍스트 렌더링 완료
[2025-07-04 09:30:33,569] [MainThread] [INFO] [image_processor2.py:process_single_image:117] 이미지 저장 완료 : /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_2.png
[2025-07-04 09:30:34,040] [MainThread] [INFO] [events.py:_run:81] 이미지 2 번역 완료: /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_2.png
[2025-07-04 09:30:34,048] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 🔍 OCR 감지 방식: polygon
[2025-07-04 09:30:42,076] [MainThread] [INFO] [image_translate_server.py:sem_task:81] ocr_raw_results: [[[[[74.0, 20.0], [157.0, 20.0], [157.0, 49.0], [74.0, 49.0]], ('科尔诺', 0.99479079246521)], [[[243.0, 22.0], [291.0, 22.0], [291.0, 45.0], [243.0, 45.0]], ('MC', 0.6195911169052124)], [[[309.0, 22.0], [350.0, 24.0], [349.0, 43.0], [308.0, 41.0]], ('PA', 0.9959260821342468)], [[[372.0, 25.0], [423.0, 25.0], [423.0, 41.0], [372.0, 41.0]], ('CNEX', 0.9921574592590332)], [[[493.0, 17.0], [542.0, 17.0], [542.0, 48.0], [493.0, 48.0]], ('CE', 0.9579459428787231)], [[[561.0, 19.0], [611.0, 19.0], [611.0, 46.0], [561.0, 46.0]], ('SGS', 0.9938905835151672)], [[[75.0, 53.0], [158.0, 53.0], [158.0, 74.0], [75.0, 74.0]], ('KORNO', 0.9965285062789917)], [[[240.0, 57.0], [291.0, 57.0], [291.0, 71.0], [240.0, 71.0]], ('CMC认证', 0.994641900062561)], [[[306.0, 57.0], [355.0, 57.0], [355.0, 71.0], [306.0, 71.0]], ('CPA认证', 0.997654139995575)], [[[371.0, 57.0], [419.0, 57.0], [419.0, 71.0], [371.0, 71.0]], ('国家防爆', 0.9973001480102539)], [[[436.0, 57.0], [480.0, 57.0], [480.0, 71.0], [436.0, 71.0]], ('ISO认证', 0.9966546297073364)], [[[500.0, 57.0], [539.0, 57.0], [539.0, 71.0], [500.0, 71.0]], ('CE认证', 0.9982120990753174)], [[[562.0, 57.0], [609.0, 57.0], [609.0, 71.0], [562.0, 71.0]], ('SGS认证', 0.99885493516922)], [[[45.0, 101.0], [283.0, 101.0], [283.0, 146.0], [45.0, 146.0]], ('GT-1000', 0.9948693513870239)], [[[45.0, 166.0], [407.0, 166.0], [407.0, 211.0], [45.0, 211.0]], ('激光粉尘检测仪', 0.9980872273445129)], [[[29.0, 239.0], [216.0, 237.0], [216.0, 264.0], [29.0, 266.0]], ('精度≤±5%F.S', 0.9504890441894531)], [[[28.0, 297.0], [162.0, 297.0], [162.0, 324.0], [28.0, 324.0]], ('防护等级:', 0.9984347224235535)], [[[148.0, 295.0], [236.0, 295.0], [236.0, 323.0], [148.0, 323.0]], (':IP65', 0.9789146184921265)], [[[23.0, 356.0], [420.0, 356.0], [420.0, 380.0], [23.0, 380.0]], ('过压保护/声光报警/存储打印', 0.9622878432273865)], [[[21.0, 410.0], [425.0, 413.0], [425.0, 440.0], [21.0, 437.0]], ('PM0.3/0.5/1.0/2.5/5.0/10um', 0.9829199314117432)], [[[29.0, 469.0], [371.0, 469.0], [371.0, 492.0], [29.0, 492.0]], ('可同时监测多种粒径尘埃粒子数', 0.9967647194862366)], [[[29.0, 505.0], [271.0, 505.0], [271.0, 526.0], [29.0, 526.0]], ('适合十万级以上洁净室', 0.9917227625846863)], [[[15.0, 532.0], [119.0, 532.0], [119.0, 589.0], [15.0, 589.0]], ('全国', 0.9994629621505737)], [[[194.0, 544.0], [391.0, 544.0], [391.0, 571.0], [194.0, 571.0]], ('7天无理由退货', 0.9978864789009094)], [[[428.0, 543.0], [542.0, 543.0], [542.0, 571.0], [428.0, 571.0]], ('赠运险费', 0.9983055591583252)], [[[15.0, 585.0], [122.0, 587.0], [121.0, 639.0], [14.0, 637.0]], ('包邮', 0.9907833337783813)], [[[138.0, 585.0], [625.0, 583.0], [625.0, 617.0], [138.0, 619.0]], ('原厂正品/可开发票/质保一年', 0.9910658597946167)]]]
[2025-07-04 09:30:42,077] [MainThread] [INFO] [image_translate_server.py:sem_task:81] line: [[[[74.0, 20.0], [157.0, 20.0], [157.0, 49.0], [74.0, 49.0]], ('科尔诺', 0.99479079246521)], [[[243.0, 22.0], [291.0, 22.0], [291.0, 45.0], [243.0, 45.0]], ('MC', 0.6195911169052124)], [[[309.0, 22.0], [350.0, 24.0], [349.0, 43.0], [308.0, 41.0]], ('PA', 0.9959260821342468)], [[[372.0, 25.0], [423.0, 25.0], [423.0, 41.0], [372.0, 41.0]], ('CNEX', 0.9921574592590332)], [[[493.0, 17.0], [542.0, 17.0], [542.0, 48.0], [493.0, 48.0]], ('CE', 0.9579459428787231)], [[[561.0, 19.0], [611.0, 19.0], [611.0, 46.0], [561.0, 46.0]], ('SGS', 0.9938905835151672)], [[[75.0, 53.0], [158.0, 53.0], [158.0, 74.0], [75.0, 74.0]], ('KORNO', 0.9965285062789917)], [[[240.0, 57.0], [291.0, 57.0], [291.0, 71.0], [240.0, 71.0]], ('CMC认证', 0.994641900062561)], [[[306.0, 57.0], [355.0, 57.0], [355.0, 71.0], [306.0, 71.0]], ('CPA认证', 0.997654139995575)], [[[371.0, 57.0], [419.0, 57.0], [419.0, 71.0], [371.0, 71.0]], ('国家防爆', 0.9973001480102539)], [[[436.0, 57.0], [480.0, 57.0], [480.0, 71.0], [436.0, 71.0]], ('ISO认证', 0.9966546297073364)], [[[500.0, 57.0], [539.0, 57.0], [539.0, 71.0], [500.0, 71.0]], ('CE认证', 0.9982120990753174)], [[[562.0, 57.0], [609.0, 57.0], [609.0, 71.0], [562.0, 71.0]], ('SGS认证', 0.99885493516922)], [[[45.0, 101.0], [283.0, 101.0], [283.0, 146.0], [45.0, 146.0]], ('GT-1000', 0.9948693513870239)], [[[45.0, 166.0], [407.0, 166.0], [407.0, 211.0], [45.0, 211.0]], ('激光粉尘检测仪', 0.9980872273445129)], [[[29.0, 239.0], [216.0, 237.0], [216.0, 264.0], [29.0, 266.0]], ('精度≤±5%F.S', 0.9504890441894531)], [[[28.0, 297.0], [162.0, 297.0], [162.0, 324.0], [28.0, 324.0]], ('防护等级:', 0.9984347224235535)], [[[148.0, 295.0], [236.0, 295.0], [236.0, 323.0], [148.0, 323.0]], (':IP65', 0.9789146184921265)], [[[23.0, 356.0], [420.0, 356.0], [420.0, 380.0], [23.0, 380.0]], ('过压保护/声光报警/存储打印', 0.9622878432273865)], [[[21.0, 410.0], [425.0, 413.0], [425.0, 440.0], [21.0, 437.0]], ('PM0.3/0.5/1.0/2.5/5.0/10um', 0.9829199314117432)], [[[29.0, 469.0], [371.0, 469.0], [371.0, 492.0], [29.0, 492.0]], ('可同时监测多种粒径尘埃粒子数', 0.9967647194862366)], [[[29.0, 505.0], [271.0, 505.0], [271.0, 526.0], [29.0, 526.0]], ('适合十万级以上洁净室', 0.9917227625846863)], [[[15.0, 532.0], [119.0, 532.0], [119.0, 589.0], [15.0, 589.0]], ('全国', 0.9994629621505737)], [[[194.0, 544.0], [391.0, 544.0], [391.0, 571.0], [194.0, 571.0]], ('7天无理由退货', 0.9978864789009094)], [[[428.0, 543.0], [542.0, 543.0], [542.0, 571.0], [428.0, 571.0]], ('赠运险费', 0.9983055591583252)], [[[15.0, 585.0], [122.0, 587.0], [121.0, 639.0], [14.0, 637.0]], ('包邮', 0.9907833337783813)], [[[138.0, 585.0], [625.0, 583.0], [625.0, 617.0], [138.0, 619.0]], ('原厂正品/可开发票/质保一年', 0.9910658597946167)]]
[2025-07-04 09:30:42,078] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 18개 필터링 완료
[2025-07-04 09:30:48,404] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 최종 치환 결과: ['코르노', 'MC', 'PA', 'CNEX', 'CE', 'SGS', 'KORNO', 'CMC 인증', 'CPA 인증', '국가 방폭', 'ISO 인증', 'CE 인증', 'SGS 인증', 'GT-1000', '레이저 분진 측정기', '정밀도 ≤ ±5% F.S', '방호 등급:', ':IP65', '과전압 보호/음향 및 광경고/저장 인쇄', 'PM0.3/0.5/1.0/2.5/5.0/10um', '다양한 입자 크기의 먼지 입자 수를 동시에 모니터링 가능', '10만 급 이상의 청정실에 적합', '전국', '7일 무조건 반품', '운송 보험료 무료', '무료 배송', '정품/세금계산서 발행 가능/1년 보증']
[2025-07-04 09:30:48,404] [MainThread] [INFO] [events.py:_run:81] 이미지 3 치환됨
[2025-07-04 09:30:48,432] [MainThread] [INFO] [events.py:_run:81] 마스크 생성 완료
[2025-07-04 09:31:05,907] [MainThread] [INFO] [events.py:_run:81] 인페인팅 완료
[2025-07-04 09:31:06,441] [MainThread] [INFO] [events.py:_run:81] 텍스트 렌더링 완료
[2025-07-04 09:31:06,477] [MainThread] [INFO] [image_processor2.py:process_single_image:117] 이미지 저장 완료 : /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_3.png
[2025-07-04 09:31:06,622] [MainThread] [INFO] [events.py:_run:81] 이미지 3 번역 완료: /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_3.png
[2025-07-04 09:31:06,630] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 🔍 OCR 감지 방식: polygon
[2025-07-04 09:31:12,817] [MainThread] [INFO] [image_translate_server.py:sem_task:81] ocr_raw_results: [[[[[57.0, 44.0], [708.0, 44.0], [708.0, 122.0], [57.0, 122.0]], ('高质量水晶相纸', 0.9983379244804382)], [[[76.0, 195.0], [373.0, 195.0], [373.0, 225.0], [76.0, 225.0]], ('适合各种喷墨打印机', 0.9938791990280151)], [[[74.0, 263.0], [348.0, 263.0], [348.0, 294.0], [74.0, 294.0]], ('色彩艳丽还原度高', 0.996768593788147)], [[[401.0, 260.0], [464.0, 260.0], [464.0, 277.0], [401.0, 277.0]], ('Colors', 0.9959242343902588)], [[[529.0, 259.0], [718.0, 259.0], [718.0, 283.0], [529.0, 283.0]], ('高质量水晶相纸', 0.9965776801109314)], [[[397.0, 273.0], [514.0, 271.0], [514.0, 292.0], [397.0, 294.0]], ('Beautiful彩丽', 0.8809345364570618)], [[[72.0, 324.0], [346.0, 324.0], [346.0, 355.0], [72.0, 355.0]], ('打印快干多种规格', 0.9959561824798584)], [[[428.0, 382.0], [441.0, 382.0], [441.0, 389.0], [428.0, 389.0]], ('12', 0.7686184644699097)], [[[452.0, 576.0], [499.0, 576.0], [499.0, 613.0], [452.0, 613.0]], ('4R', 0.9986365437507629)], [[[428.0, 599.0], [442.0, 599.0], [442.0, 614.0], [428.0, 614.0]], ('20', 0.9641551971435547)], [[[428.0, 619.0], [448.0, 619.0], [448.0, 636.0], [428.0, 636.0]], ('100', 0.998291015625)], [[[412.0, 640.0], [449.0, 640.0], [449.0, 654.0], [412.0, 654.0]], ('SHEETS', 0.9623568654060364)], [[[463.0, 633.0], [495.0, 633.0], [495.0, 653.0], [463.0, 653.0]], ('230', 0.9994447827339172)], [[[459.0, 654.0], [495.0, 654.0], [495.0, 672.0], [459.0, 672.0]], ('g/m"', 0.7422873377799988)]]]
[2025-07-04 09:31:12,818] [MainThread] [INFO] [image_translate_server.py:sem_task:81] line: [[[[57.0, 44.0], [708.0, 44.0], [708.0, 122.0], [57.0, 122.0]], ('高质量水晶相纸', 0.9983379244804382)], [[[76.0, 195.0], [373.0, 195.0], [373.0, 225.0], [76.0, 225.0]], ('适合各种喷墨打印机', 0.9938791990280151)], [[[74.0, 263.0], [348.0, 263.0], [348.0, 294.0], [74.0, 294.0]], ('色彩艳丽还原度高', 0.996768593788147)], [[[401.0, 260.0], [464.0, 260.0], [464.0, 277.0], [401.0, 277.0]], ('Colors', 0.9959242343902588)], [[[529.0, 259.0], [718.0, 259.0], [718.0, 283.0], [529.0, 283.0]], ('高质量水晶相纸', 0.9965776801109314)], [[[397.0, 273.0], [514.0, 271.0], [514.0, 292.0], [397.0, 294.0]], ('Beautiful彩丽', 0.8809345364570618)], [[[72.0, 324.0], [346.0, 324.0], [346.0, 355.0], [72.0, 355.0]], ('打印快干多种规格', 0.9959561824798584)], [[[428.0, 382.0], [441.0, 382.0], [441.0, 389.0], [428.0, 389.0]], ('12', 0.7686184644699097)], [[[452.0, 576.0], [499.0, 576.0], [499.0, 613.0], [452.0, 613.0]], ('4R', 0.9986365437507629)], [[[428.0, 599.0], [442.0, 599.0], [442.0, 614.0], [428.0, 614.0]], ('20', 0.9641551971435547)], [[[428.0, 619.0], [448.0, 619.0], [448.0, 636.0], [428.0, 636.0]], ('100', 0.998291015625)], [[[412.0, 640.0], [449.0, 640.0], [449.0, 654.0], [412.0, 654.0]], ('SHEETS', 0.9623568654060364)], [[[463.0, 633.0], [495.0, 633.0], [495.0, 653.0], [463.0, 653.0]], ('230', 0.9994447827339172)], [[[459.0, 654.0], [495.0, 654.0], [495.0, 672.0], [459.0, 672.0]], ('g/m"', 0.7422873377799988)]]
[2025-07-04 09:31:12,819] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 6개 필터링 완료
[2025-07-04 09:31:15,005] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 최종 치환 결과: ['고품질 크리스탈 사진지', '모든 잉크젯 프린터에 적합', '색상이 선명하고 재현도가 높음', '색상', '고품질 크리스탈 사진지', '아름다운 색상', '빠른 건조, 다양한 규격', '12', '4R', '20', '100', '장', '230', 'g/m²']
[2025-07-04 09:31:15,005] [MainThread] [INFO] [events.py:_run:81] 이미지 4 치환됨
[2025-07-04 09:31:15,026] [MainThread] [INFO] [events.py:_run:81] 마스크 생성 완료
[2025-07-04 09:31:40,489] [MainThread] [INFO] [events.py:_run:81] 인페인팅 완료
[2025-07-04 09:31:40,746] [MainThread] [INFO] [events.py:_run:81] 텍스트 렌더링 완료
[2025-07-04 09:31:40,818] [MainThread] [INFO] [image_processor2.py:process_single_image:117] 이미지 저장 완료 : /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_4.png
[2025-07-04 09:31:41,013] [MainThread] [INFO] [events.py:_run:81] 이미지 4 번역 완료: /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_4.png
[2025-07-04 09:31:41,035] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 🔍 OCR 감지 방식: polygon
[2025-07-04 09:31:43,463] [MainThread] [INFO] [image_translate_server.py:sem_task:81] ocr_raw_results: [[[[[344.0, 108.0], [855.0, 108.0], [855.0, 182.0], [344.0, 182.0]], ('现代极简风格', 0.9951424598693848)], [[[235.0, 219.0], [964.0, 219.0], [964.0, 279.0], [235.0, 279.0]], ('更易搭配各种使用场景', 0.9972127079963684)], [[[136.0, 447.0], [717.0, 447.0], [717.0, 534.0], [136.0, 534.0]], ('半圆两端设计', 0.998131275177002)], [[[134.0, 571.0], [715.0, 571.0], [715.0, 658.0], [134.0, 658.0]], ('承载各种欢乐', 0.9950398802757263)]]]
[2025-07-04 09:31:43,464] [MainThread] [INFO] [image_translate_server.py:sem_task:81] line: [[[[344.0, 108.0], [855.0, 108.0], [855.0, 182.0], [344.0, 182.0]], ('现代极简风格', 0.9951424598693848)], [[[235.0, 219.0], [964.0, 219.0], [964.0, 279.0], [235.0, 279.0]], ('更易搭配各种使用场景', 0.9972127079963684)], [[[136.0, 447.0], [717.0, 447.0], [717.0, 534.0], [136.0, 534.0]], ('半圆两端设计', 0.998131275177002)], [[[134.0, 571.0], [715.0, 571.0], [715.0, 658.0], [134.0, 658.0]], ('承载各种欢乐', 0.9950398802757263)]]
[2025-07-04 09:31:43,465] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 4개 필터링 완료
[2025-07-04 09:31:44,783] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 최종 치환 결과: ['현대 미니멀리즘 스타일', '다양한 사용 상황에 더 쉽게 어울림', '반원 양쪽 끝 디자인', '다양한 즐거움을 담다']
[2025-07-04 09:31:44,784] [MainThread] [INFO] [events.py:_run:81] 이미지 5 치환됨
[2025-07-04 09:31:44,824] [MainThread] [INFO] [events.py:_run:81] 마스크 생성 완료
[2025-07-04 09:32:43,447] [MainThread] [INFO] [events.py:_run:81] 인페인팅 완료
[2025-07-04 09:32:43,689] [MainThread] [INFO] [events.py:_run:81] 텍스트 렌더링 완료
[2025-07-04 09:32:43,858] [MainThread] [INFO] [image_processor2.py:process_single_image:117] 이미지 저장 완료 : /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_5.png
[2025-07-04 09:32:44,414] [MainThread] [INFO] [events.py:_run:81] 이미지 5 번역 완료: /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_5.png
[2025-07-04 09:32:44,432] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 🔍 OCR 감지 방식: polygon
[2025-07-04 09:32:46,459] [MainThread] [INFO] [image_translate_server.py:sem_task:81] ocr_raw_results: [[[[[60.0, 60.0], [264.0, 63.0], [264.0, 92.0], [60.0, 89.0]], ('WA汉世刘家', 0.7825194001197815)], [[[43.0, 129.0], [541.0, 129.0], [541.0, 182.0], [43.0, 182.0]], ('脱水比洗衣机更干', 0.9943966865539551)], [[[38.0, 205.0], [394.0, 203.0], [394.0, 268.0], [39.0, 270.0]], ('真正免手洗', 0.9823843240737915)]]]
[2025-07-04 09:32:46,460] [MainThread] [INFO] [image_translate_server.py:sem_task:81] line: [[[[60.0, 60.0], [264.0, 63.0], [264.0, 92.0], [60.0, 89.0]], ('WA汉世刘家', 0.7825194001197815)], [[[43.0, 129.0], [541.0, 129.0], [541.0, 182.0], [43.0, 182.0]], ('脱水比洗衣机更干', 0.9943966865539551)], [[[38.0, 205.0], [394.0, 203.0], [394.0, 268.0], [39.0, 270.0]], ('真正免手洗', 0.9823843240737915)]]
[2025-07-04 09:32:46,460] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 3개 필터링 완료
[2025-07-04 09:32:47,831] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 최종 치환 결과: ['WA한세유가', '탈수는 세탁기보다 더 건조하다', '진정한 손세탁 면제']
[2025-07-04 09:32:47,832] [MainThread] [INFO] [events.py:_run:81] 이미지 6 치환됨
[2025-07-04 09:32:47,856] [MainThread] [INFO] [events.py:_run:81] 마스크 생성 완료
[2025-07-04 09:33:09,533] [MainThread] [INFO] [events.py:_run:81] 인페인팅 완료
[2025-07-04 09:33:09,637] [MainThread] [INFO] [events.py:_run:81] 텍스트 렌더링 완료
[2025-07-04 09:33:09,721] [MainThread] [INFO] [image_processor2.py:process_single_image:117] 이미지 저장 완료 : /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_6.png
[2025-07-04 09:33:09,941] [MainThread] [INFO] [events.py:_run:81] 이미지 6 번역 완료: /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_6.png
[2025-07-04 09:33:09,952] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 🔍 OCR 감지 방식: polygon
[2025-07-04 09:33:13,510] [MainThread] [INFO] [image_translate_server.py:sem_task:81] ocr_raw_results: [[[[[196.0, 55.0], [405.0, 55.0], [405.0, 72.0], [196.0, 72.0]], ('MICROCULTIVATOR-', 0.9893487095832825)], [[[183.0, 102.0], [423.0, 102.0], [423.0, 160.0], [183.0, 160.0]], ('轻轻一拉', 0.9972223043441772)], [[[78.0, 179.0], [525.0, 179.0], [525.0, 227.0], [78.0, 227.0]], ('3秒即可快速启动', 0.9966239929199219)], [[[98.0, 266.0], [506.0, 266.0], [506.0, 286.0], [98.0, 286.0]], ('加快机器供油燃烧传动流程3秒快速启动', 0.9955464601516724)], [[[178.0, 290.0], [430.0, 290.0], [430.0, 310.0], [178.0, 310.0]], ('让您不用浪费时间在启动上', 0.9967800974845886)]]]
[2025-07-04 09:33:13,510] [MainThread] [INFO] [image_translate_server.py:sem_task:81] line: [[[[196.0, 55.0], [405.0, 55.0], [405.0, 72.0], [196.0, 72.0]], ('MICROCULTIVATOR-', 0.9893487095832825)], [[[183.0, 102.0], [423.0, 102.0], [423.0, 160.0], [183.0, 160.0]], ('轻轻一拉', 0.9972223043441772)], [[[78.0, 179.0], [525.0, 179.0], [525.0, 227.0], [78.0, 227.0]], ('3秒即可快速启动', 0.9966239929199219)], [[[98.0, 266.0], [506.0, 266.0], [506.0, 286.0], [98.0, 286.0]], ('加快机器供油燃烧传动流程3秒快速启动', 0.9955464601516724)], [[[178.0, 290.0], [430.0, 290.0], [430.0, 310.0], [178.0, 310.0]], ('让您不用浪费时间在启动上', 0.9967800974845886)]]
[2025-07-04 09:33:13,511] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 중국어 텍스트 4개 필터링 완료
[2025-07-04 09:33:15,757] [MainThread] [INFO] [image_translate_server.py:sem_task:81] 최종 치환 결과: ['마이크로 경작기-', '가볍게 당기기만 하면', '3초 만에 빠르게 시작할 수 있습니다.', '기계의 연료 공급, 연소, 전송 과정을 3초 만에 빠르게 시작합니다.', '시작하는 데 시간을 낭비하지 않도록 해드립니다.']
[2025-07-04 09:33:15,758] [MainThread] [INFO] [events.py:_run:81] 이미지 7 치환됨
[2025-07-04 09:33:15,782] [MainThread] [INFO] [events.py:_run:81] 마스크 생성 완료
[2025-07-04 09:33:42,937] [MainThread] [INFO] [events.py:_run:81] 인페인팅 완료
[2025-07-04 09:33:43,057] [MainThread] [INFO] [events.py:_run:81] 텍스트 렌더링 완료
[2025-07-04 09:33:43,111] [MainThread] [INFO] [image_processor2.py:process_single_image:117] 이미지 저장 완료 : /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_7.png
[2025-07-04 09:33:43,348] [MainThread] [INFO] [events.py:_run:81] 이미지 7 번역 완료: /home/ckh08045/work/IT_Server/temp_images/translated_multi_img_7.png

View File

@ -70,9 +70,15 @@ class IOPaintManager:
def _start_instances(self, num, wait_ready):
self.logger.log(f"IOPaint 인스턴스 {num} 개 시작", level=logging.INFO)
try:
import torch
device_type = "cuda" if torch.cuda.is_available() else "cpu"
except Exception as e:
self.logger.log(f"torch import 또는 GPU 체크 실패: {e}", level=logging.WARNING)
device_type = "cpu"
for _ in range(num):
port = self._get_random_port()
cmd = [self.exe_path, 'start', '--model=lama', '--device=cpu', '--port', str(port), '--model-dir', self.model_dir]
cmd = [self.exe_path, 'start', '--model=lama', f'--device={device_type}', '--port', str(port), '--model-dir', self.model_dir]
self.logger.log(f"[{port}] 인스턴스 실행 명령: {' '.join(cmd)}", level=logging.INFO)
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
instance = self.ServerInstance(port, proc)
@ -179,8 +185,14 @@ class IOPaintManager:
self.mark_instance_idle(instance.port)
def add_instance(self, wait_ready=30):
try:
import torch
device_type = "cuda" if torch.cuda.is_available() else "cpu"
except Exception as e:
self.logger.log(f"torch import 또는 GPU 체크 실패: {e}", level=logging.WARNING)
device_type = "cpu"
port = self._get_random_port()
cmd = [self.exe_path, 'start', '--model=lama', '--device=cpu', '--port', str(port), '--model-dir', self.model_dir]
cmd = [self.exe_path, 'start', '--model=lama', f'--device={device_type}', '--port', str(port), '--model-dir', self.model_dir]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
instance = self.ServerInstance(port, proc)
self.instances.append(instance)

View File

@ -9,8 +9,8 @@ class OCRModule:
self.logger = logger
self.base_dir = base_dir
# CPU만 사용하도록 환경 변수 설정
os.environ['CUDA_VISIBLE_DEVICES'] = ''
# CUDA 사용 가능하도록 환경 변수 설정 제거
# os.environ['CUDA_VISIBLE_DEVICES'] = ''
self.ocr = None
@ -29,9 +29,16 @@ class OCRModule:
try:
from paddleocr import PaddleOCR
import paddle
use_gpu = False
try:
use_gpu = paddle.is_compiled_with_cuda() and paddle.device.is_compiled_with_cuda()
except Exception as e:
self.logger.log(f"GPU 사용 가능 여부 확인 중 오류: {e}", level=logging.WARNING)
use_gpu = False
self.logger.log(f"PaddleOCR use_gpu: {use_gpu}", level=logging.INFO)
ocr = PaddleOCR(
use_gpu=False,
use_gpu=use_gpu, # GPU 사용 가능하면 활성화
use_angle_cls=True, # 텍스트 방향 분류 활성화
lang="ch",
det_model_dir=self.det_model_dir,

View File

@ -4,7 +4,7 @@ import os
import time
API_URL = "http://127.0.0.1:7000/translate_images"
IMG_DIR = "d:/py/IT_Server/modules/img"
IMG_DIR = "/home/ckh08045/work/IT_Server/modules/img"
# img 폴더의 모든 이미지 파일 리스트업
image_files = [os.path.join(IMG_DIR, f) for f in os.listdir(IMG_DIR)

15
re/export.py Normal file
View File

@ -0,0 +1,15 @@
# RETHINED 모델 export.py
import torch
from rethined import RethinedModel # 논문 제공 코드 임포트
model = RethinedModel().eval().to('cuda')
H, W = 512, 512 # 또는 원하는 해상도
dummy = torch.randn(1, 3, H, W, device='cuda')
torch.onnx.export(
model, dummy, "rethined.onnx",
opset_version=14,
input_names=['input'],
output_names=['output'],
dynamic_axes={'input':{2:'height',3:'width'}, 'output':{2:'height',3:'width'}}
)

View File

@ -7,3 +7,6 @@ numpy
requests
pillow
openai
shapely
paddleocr==2.10.0
paddlepaddle