Compare commits

...

643 Commits

Author SHA1 Message Date
Daniel Yang 01d4174112
Merge pull request #2103 from Evezerest/develop
5 years ago
Leif 081a7785b8 Change the path of joinus.png to absolute path
5 years ago
Leif ddb7a72d94 Merge remote-tracking branch 'upstream/develop' into develop
5 years ago
Double_V d14d72e35a
Merge pull request #2030 from LDOUBLEV/lite_doc
5 years ago
LDOUBLEV 4ac4184c05 opt doc
5 years ago
LDOUBLEV c16ee57abd opt doc
5 years ago
LDOUBLEV ee2bfb222f fix lite doc
5 years ago
zhoujun 29c825031a
Merge pull request #1822 from WenmuZhou/master
5 years ago
WenmuZhou ed400c8645 mv3 small support det
5 years ago
Daniel Yang 0275354c93
Merge pull request #1656 from Evezerest/develop
5 years ago
Leif 0083d28a75 Update readme
5 years ago
Leif ea1b76af19 Keep in sync with the dygraph branch
5 years ago
zhoujun 12442d1c4f
Merge pull request #1622 from PaddlePaddle/WenmuZhou-patch-1
5 years ago
zhoujun 691c9662ba
Update predict_det.py
5 years ago
littletomatodonkey 534ef5d9d0
fix cpp infer (#1594)
5 years ago
MissPenguin 4da38551aa
Update algorithm_overview_en.md
5 years ago
Leif 1749464b6e Add single box re-recognition function and perfect shortcut keys
5 years ago
MissPenguin af75806fd1
Merge pull request #1484 from Evezerest/develop
5 years ago
Leif 797ab8a18b Update joinus.png
5 years ago
Leif e416f19780 Merge remote-tracking branch 'upstream/develop' into develop
5 years ago
dyning c121e0c8e8
Update readme.md
5 years ago
dyning f01b643779
Update readme_en.md
5 years ago
MissPenguin 3af8e009c1
Merge pull request #1442 from LDOUBLEV/fix_lite_doc
5 years ago
LDOUBLEV 62b3050267 update lite doc
5 years ago
Double_V 3a20ddd6cf
Merge pull request #1432 from cdb494748813/develop
5 years ago
cdb cc9d9e5ce6 通过信号反复发送大量数据可能影响程序运行效率,最好注释掉此句,不发送识别结果到界面滚动显示
5 years ago
cdb b559bf3ffd 将识别结果通过PyqtSignal分批emit,修改为拼接识别结果后统一emit
5 years ago
MissPenguin 050a29a9fc
Merge pull request #1418 from Evezerest/develop
5 years ago
Leif 2423054d83 Update wechat group QR code and delete redundancy codes in PPOCRLabel
5 years ago
Leif a8122289c2 Merge remote-tracking branch 'upstream/develop' into develop
5 years ago
MissPenguin 60ec405c6d
Update FAQ.md
5 years ago
MissPenguin e106563699
Update FAQ.md
5 years ago
MissPenguin 300c66a174
Merge pull request #1409 from MissPenguin/develop
5 years ago
Leif 7ec4c0e4cb Delete xml related codes
5 years ago
MissPenguin fd1961a4dc update FAQ
5 years ago
MissPenguin 7c57902e1f update FAQ
5 years ago
MissPenguin e7a708e9fd
Merge pull request #1377 from YukSing12/develop
5 years ago
Leif f45bdf5bf0 Add save label in menu
5 years ago
YukSing12 ea39083bd4 Fix bug
5 years ago
Daniel Yang 23942cf7bc
Merge pull request #1347 from Evezerest/develop
5 years ago
Double_V 2e0a1e233c
Merge pull request #1350 from YukSing12/develop
5 years ago
YukSing12 8f5f35e643 Fix path
5 years ago
Leif eb2053467d Enable difficult mode, fix a bug on Mac and Update icon
5 years ago
Daniel Yang 70f3414622
Update FAQ.md
5 years ago
Daniel Yang 1d6368343d
Update FAQ.md
5 years ago
Daniel Yang c36e6fdf4a
Update FAQ.md
5 years ago
Daniel Yang d7bd1b6fc1
Update FAQ.md
5 years ago
Daniel Yang cba3b39eb3
Update README_ch.md
5 years ago
Daniel Yang 0e6201e943
Merge pull request #1335 from WenmuZhou/master
6 years ago
Daniel Yang ece0f30b6d
Merge pull request #1341 from grasswolfs/update_joinus_1207
6 years ago
grasswolfs 0255df4ab6 test=develop, test=documents_fix
6 years ago
zhoujun c83b99cafa
Merge pull request #1320 from ninetailskim/devddd
6 years ago
WenmuZhou 7e7225f434 update link
6 years ago
WenmuZhou 706debf678 update faq
6 years ago
ninetailskim a6af1cb66b
Merge branch 'develop' into devddd
6 years ago
WenmuZhou 92326ef8f1 Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleOCR into master
6 years ago
ninetailskim ed7403fc12 avoiding conflicts when thirdparty set parameters which not in paddleocr
6 years ago
Daniel Yang 2e088638d4
Merge pull request #1315 from Evezerest/develop
6 years ago
Leif a9a1606f19 Delete build tool
6 years ago
Daniel Yang 4b526fb586
Merge pull request #1309 from Evezerest/develop
6 years ago
Leif 438d064777 Opencv installation version is specified
6 years ago
Leif 61d52897d4 Update installation steps
6 years ago
Double_V 910c6128bb
Merge pull request #1203 from LDOUBLEV/fixocr
6 years ago
Daniel Yang f501be3c68
Merge pull request #1294 from grasswolfs/update_joinus_1201
6 years ago
grasswolfs 87fea7ecb0 test=develop, test=documents_fix
6 years ago
zhoujun 99a686e476
hide argparse when use whl by python (#1287)
6 years ago
zhoujun 7ed238f786
update whl doc (#1289)
6 years ago
zhoujun cf4a41542b
fix image_shape error when tps in model and char_type is ch (#1290)
6 years ago
WenmuZhou f96bf152f8 set use_angle_cls defalut valut to false
6 years ago
WenmuZhou efba14e1cc hide argparse when use whl by python
6 years ago
LDOUBLEV f2c35f55a2 enable_static to export_model
6 years ago
LDOUBLEV 0045e0894f print to logger.info
6 years ago
LDOUBLEV 06921b135b print to logger.info
6 years ago
MissPenguin 0007e4eeda
Merge pull request #1278 from dyning/develop
6 years ago
dyning 7731fab9a0 updata faq
6 years ago
Daniel Yang 401506396e
Merge pull request #1274 from grasswolfs/update_readme_joinus_1129
6 years ago
grasswolfs 9f7544de17 test=develop, test=documents_fix
6 years ago
grasswolfs 0196544166 test=develop, test=documents_fix
6 years ago
grasswolfs a994c5af6f test=develop, test=documents_fix
6 years ago
Daniel Yang a170a8ee37
Merge pull request #1270 from Evezerest/develop
6 years ago
Daniel Yang 75ecb62bc1
Merge pull request #1103 from LKKlein/develop
6 years ago
Leif c6a7e0e642 Revert code display
6 years ago
Leif e57e6144e5 Update Readme_en
6 years ago
Leif 30fb939ed7 Add English readme and interface
6 years ago
LKKlein b78549484b move from deploy to thirdparty
6 years ago
LKKlein 70eb59327a mv go package to thirdparty
6 years ago
LKKlein 46d164a130 Merge remote-tracking branch 'upstream/develop' into develop
6 years ago
zhoujun d0db30668f
Merge pull request #1264 from WenmuZhou/master
6 years ago
WenmuZhou ca34277361 修正小语种字典路径错误的问题
6 years ago
zhoujun e51045ca03
Merge pull request #10 from PaddlePaddle/develop
6 years ago
shaohua.zhang e6f89bd85e
fix some args positon (#1228)
6 years ago
Mike Shi ca5308c94e
make predict_det.py work on windows (#1236)
6 years ago
Kevin Loftis 2ffbece713
fixed type in setup.py (#1242)
6 years ago
Daniel Yang 8a43606670
Update README_ch.md
6 years ago
Daniel Yang e975e3277e
Update README_ch.md
6 years ago
Daniel Yang 9ba7f088db
Update README_ch.md
6 years ago
Daniel Yang ce6bea9f36
Merge pull request #1252 from Evezerest/patch-1
6 years ago
Evezerest 1147521631
Update PPOCRLabel.py
6 years ago
MissPenguin 1def9f4ddc
Merge pull request #1246 from Evezerest/develop
6 years ago
Leif 0fe693575f Add an annotation tool PPOCRLabel
6 years ago
MissPenguin ae6403d55b
Merge pull request #1224 from weisy11/develop
6 years ago
weishengyu 0bb76def36 add date
6 years ago
weishengyu 2a8ddde2c4 add new FAQ
6 years ago
Daniel Yang ac2be3f516
Merge pull request #1222 from grasswolfs/update_joinus_1122
6 years ago
grasswolfs 48f9ee87fa test=develop, test=document_fix
6 years ago
shaohua.zhang a9d709315a
fix some errors and bugs (#1185)
6 years ago
littletomatodonkey 0361647094
fix logg (#1182)
6 years ago
LDOUBLEV 70f87eee23 fix typo and print
6 years ago
xiaoting 4cf85329cd
Merge pull request #1174 from tink2123/for_faq
6 years ago
tink2123 c329b73e3f update readme for faq
6 years ago
tink2123 a114d53a03 update faq
6 years ago
Daniel Yang 59b3a1ebbb
Merge pull request #1172 from tangmq/develop
6 years ago
Tangmq 6fea9dacdc update dockerfile to support latest paddleocr
6 years ago
Daniel Yang 73e1fc4fe4
Update quickstart.md
6 years ago
Daniel Yang a501603d54
Merge pull request #1158 from grasswolfs/update_joinus_1112
6 years ago
grasswolfs c57d19775e test=develop, test=document_fix
6 years ago
littletomatodonkey cf8530b904
adapt codes to Paddle2.0-rc (#1153)
6 years ago
xiaoting e0c8b88993
Merge pull request #1136 from tink2123/android_demo
6 years ago
MissPenguin 7a26df0057
Merge pull request #1134 from xmy0916/myBranch
6 years ago
MissPenguin 2334467e06
Update installation.md
6 years ago
MissPenguin fc827b4e5e
Update installation_en.md
6 years ago
LKKlein 8fdaae31c6 update more efficent way to get slice from cgo
6 years ago
Daniel Yang b631887de4
Update README_ch.md
6 years ago
Daniel Yang 4133de4570
Merge pull request #1140 from grasswolfs/update_joinus_1109
6 years ago
grasswolfs 12eb3d806e test=develop, test=document_fix
6 years ago
Daniel Yang feb803761b
Update FAQ.md
6 years ago
Daniel Yang a52184fddb
Update FAQ.md
6 years ago
dyning de5b7a737b
Merge pull request #1135 from PaddlePaddle/littletomatodonkey-patch-2
6 years ago
tink2123 c748f77f3b fix android demo
6 years ago
littletomatodonkey 8218aba534
update doc, test=document_fix
6 years ago
“xmy0916 34812ad4af Correct spelling errors
6 years ago
MissPenguin 5e2c1b303b
Merge pull request #1116 from littletomatodonkey/sta/fix_resize
6 years ago
Double_V 00b4cba431
Merge pull request #1129 from LDOUBLEV/fixocr
6 years ago
littletomatodonkey c69e13c852
update doc, test=document_fix (#1131)
6 years ago
littletomatodonkey 03dfd6280e
add faq 20201109 (#1127)
6 years ago
Double_V ad7f65f70a
Merge pull request #1113 from LDOUBLEV/fixocr
6 years ago
LDOUBLEV 122daca4a9 modify lite readme doc,test=document_fix
6 years ago
LKKlein d6b7d8b9df remove unused dict
6 years ago
LKKlein a0cd182de9 close unused gocv.Mat
6 years ago
LKKlein 879172a507 change demo to ppocr-go
6 years ago
dyning 3f7395bccb
Update README_ch.md
6 years ago
dyning 143ef2fb9a
Update README_ch.md
6 years ago
littletomatodonkey e57e9938d4 fix -1 in det resize
6 years ago
LDOUBLEV 95567abe45 TestReader.infer_img to Global.infer_img
6 years ago
Daniel Yang f21c41c3b5
Merge pull request #1109 from grasswolfs/add_thirdparty_1105
6 years ago
grasswolfs a56f194d33 test=develop, test=documents_fix
6 years ago
grasswolfs bd60766161 test=develop, test=documents_fix
6 years ago
Double_V 2ec822ce80
Merge pull request #1098 from yukavio/develop
6 years ago
LKKlein bf0adf0afc update dict download instruction
6 years ago
LKKlein 16a2ab586a fix default download path; auto-download dict from http
6 years ago
LKKlein 62d302ff85 fix paddleocr-go module path
6 years ago
LKKlein 44406c5148 add paddle_c_api.h
6 years ago
LKKlein b9e7990628 update readmd
6 years ago
LKKlein f8c70ed19c fix paddle_c path
6 years ago
LKKlein e5b4cf75f7 fix paddleocr-go path
6 years ago
LKKlein 83c2d73b22 fix go mod path
6 years ago
LKKlein 835b69c04b add go deploy for paddleocr
6 years ago
yukavio aa3266b192 update for enable static
6 years ago
yukavio e66b53ca3e fix some bug
6 years ago
MissPenguin eb386cdb8e
Update readme.md
6 years ago
MissPenguin e7557e1884
Update params.py
6 years ago
MissPenguin d7d4892e00
Update readme.md
6 years ago
MissPenguin c37bf51768
Update readme.md
6 years ago
MissPenguin 6f06f60f59
Update readme_en.md
6 years ago
MissPenguin 71e45c94ed
Update readme_en.md
6 years ago
dyning 918adfd7c2
Update FAQ.md
6 years ago
dyning 5ca398a7f7
Update FAQ.md
6 years ago
dyning 0ce491b87e
Update README_ch.md
6 years ago
dyning 688f0f7f3b
Merge pull request #1077 from LDOUBLEV/fixocr
6 years ago
LDOUBLEV 5e6fc91bfc add faq, test=document_fix
6 years ago
LDOUBLEV a2937827c2 add faq, test=document_fix
6 years ago
LDOUBLEV b8a94e4858 add faq, test=document_fix
6 years ago
LDOUBLEV ce09c1cce2 add faq, test=document_fix
6 years ago
Daniel Yang e9d533fc1f
Merge pull request #1076 from grasswolfs/update_QR_group7_1102
6 years ago
grasswolfs eb9eb910f7 test=develop, test=document_fix
6 years ago
zhoujun 4c95450a85
add use_pdserving param (#1062)
6 years ago
MissPenguin 0586d56d2b
Update readme.md
6 years ago
MissPenguin 9075b95c25
Update readme.md
6 years ago
MissPenguin 30631d22b9
Merge pull request #1059 from MissPenguin/develop
6 years ago
MissPenguin a37b96d79c
Update README_ch.md
6 years ago
MissPenguin 705c4a7776 update pdserving
6 years ago
MissPenguin ec68899cc7
Merge pull request #1054 from MissPenguin/develop
6 years ago
MissPenguin f70371eedd
Merge branch 'develop' into develop
6 years ago
MissPenguin f0a8cdcb21 update pdserving
6 years ago
MissPenguin 47f1fb5992 update pdserving
6 years ago
littletomatodonkey 0cda9b8757
fix cuda default value (#1051)
6 years ago
Daniel Yang 8477aa8ec3
Merge pull request #1050 from grasswolfs/revise_readme_1029
6 years ago
grasswolfs 47ae71d5e7 test=develop, test=document_fix
6 years ago
Daniel Yang 9f548c2d4a
Merge pull request #1049 from grasswolfs/update_readme_en_1028
6 years ago
grasswolfs c9b928fd81 test=develop, test=document_fix
6 years ago
shaohua.zhang eb15a98457
add the character_dict_path to the yml (#1045)
6 years ago
grasswolfs dc03b6e348 test=develop, test=document_fix
6 years ago
dyning 7ad0fe5eb8
Merge pull request #1043 from tink2123/srn_ann
6 years ago
tink2123 fa12cf0b6d polish srn anno
6 years ago
dyning 22d07492af
Merge pull request #1040 from TingquanGao/develop
6 years ago
MissPenguin 251555f74e
Merge pull request #1041 from LDOUBLEV/fixocr
6 years ago
dyning 89ccf50bac
Merge pull request #1042 from dyning/develop
6 years ago
MissPenguin 9f3b617ec7
Merge pull request #1039 from littletomatodonkey/add_utility_doc
6 years ago
MissPenguin 1dff9f7cc2
Merge pull request #1037 from wangjiawei04/ocr_1028
6 years ago
dyning 4713f24dc1 add anno for tps
6 years ago
LDOUBLEV 082e7385e2 add code comment
6 years ago
littletomatodonkey 4b921e2f16 add opt doc
6 years ago
dyning 2cdafa106e
Merge pull request #1036 from tink2123/add_anno
6 years ago
dyning b131c31af5
Merge pull request #1035 from LDOUBLEV/fixocr
6 years ago
dyning 2863bc04ed
Merge pull request #1034 from WenmuZhou/fix_cls_shape
6 years ago
Daniel Yang 0d7b7872a9
Merge pull request #1038 from grasswolfs/revise_readme_1028
6 years ago
dyning 5922533f84
Merge pull request #1033 from weisy11/develop
6 years ago
grasswolfs c7ac39c66d test=develop, test=document_fix
6 years ago
wangjiawei04 d549212521 add box pos
6 years ago
tink2123 911c604dd6 add anno for head
6 years ago
LDOUBLEV 90734ca685 add comment
6 years ago
WenmuZhou c7aa9a8156 update FAQ, test=document_fix
6 years ago
dyning 234bb38c8a
Merge pull request #1031 from LDOUBLEV/fixocr
6 years ago
weishengyu 37d92beacf Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleOCR into develop
6 years ago
weishengyu b60806e3ed change pip3 -> python3 -m pip
6 years ago
WenmuZhou 7e4aee475d Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleOCR into fix_cls_shape
6 years ago
MissPenguin c162d4e0ef
Merge pull request #1027 from lijinhan/develop
6 years ago
LDOUBLEV 725185cd6a add comment db post_process
6 years ago
dyning 5299d8e62d
Merge pull request #1025 from littletomatodonkey/dev/fix_hb_export
6 years ago
lijinhan f5ebb68f83 java SpringBoot 调用OCR Hubserving接口
6 years ago
littletomatodonkey d1322af3a5 fix conflicts
6 years ago
littletomatodonkey 94faae6cca fix export
6 years ago
zhoujun 3573388b7f
update image shape for angle class from [3,32,100] to [3,48,192] (#1021)
6 years ago
littletomatodonkey 8293b6b07d fix export python path
6 years ago
WenmuZhou 5e1b7a184a update image shape for angle class from [3,32,100] to [3,48,192]
6 years ago
Double_V 6947196684
Merge pull request #1018 from LDOUBLEV/fixocr
6 years ago
Daniel Yang b0ac4784e6
Merge pull request #1020 from grasswolfs/update_joinuspng_1027
6 years ago
grasswolfs 64453a8abf test=develop,test=document_fix
6 years ago
LDOUBLEV 6c0e331833 keep db post_process param of yml same with utility.py
6 years ago
Aaron f0b9bcf49a
Fix the table view in deploy/lite/readme_en.md (#947)
6 years ago
Double_V c77427630c
Merge pull request #1005 from baiyfbupt/cls_qat
6 years ago
baiyfbupt a2e932c0fb add cls model quant code
6 years ago
dyning a978d82f8a
Update README_ch.md
6 years ago
dyning 6644fb96f1
Merge pull request #991 from WenmuZhou/fix_faq
6 years ago
WenmuZhou a0708d2ec2 update question num, test=document_fix
6 years ago
WenmuZhou a8b8178bc7 update index and question num, test=document_fix
6 years ago
WenmuZhou d0fc39a85b 修改主页近期更新日期
6 years ago
WenmuZhou 9b4bc44323 近期更新排序
6 years ago
Daniel Yang e81c10e0ea
Update readme_en.md
6 years ago
dyning 6c63ff42a0
Merge pull request #1000 from grasswolfs/update_joinus_1025
6 years ago
grasswolfs 93f2d2164c test=develop, test=document_fix
6 years ago
dyning 46ca5921c9
Add files via upload
6 years ago
dyning f372da80a9
Delete joinus.PNG
6 years ago
littletomatodonkey 70caca2e6e
fix serving link (#994)
6 years ago
Daniel Yang db6f83de78
Update README_ch.md
6 years ago
Daniel Yang 5824b980e7
Update README.md
6 years ago
WenmuZhou 45b830c4ba 近期更新问题更新
6 years ago
xiaoting 17e05cd168
Merge pull request #985 from WenmuZhou/fix_cls_doc
6 years ago
Double_V a39f3da9e2
Merge pull request #987 from LDOUBLEV/fixocr
6 years ago
LDOUBLEV b9439bfbc0 fix lite doc
6 years ago
LDOUBLEV 7b39b84ccf fix lite doc
6 years ago
zhoujun 309c2e9d8b
Merge pull request #984 from WenmuZhou/fix_cls_doc
6 years ago
WenmuZhou a565815044 delete -1 in east and db process
6 years ago
littletomatodonkey 5069baf02c
Merge pull request #622 from BeyondYourself/BeyondYourself-barnch-8-27
6 years ago
littletomatodonkey 606f869d01
Merge pull request #982 from FLming/develop
6 years ago
WenmuZhou e0b194da1c fix angle class en doc, test=document_fix
6 years ago
FLming 2734733630 Fix bug: Errors caused by disordered dictionary
6 years ago
dyning 5238c0bd47
Update requirments.txt
6 years ago
Double_V d8ed88dac4
Merge pull request #960 from littletomatodonkey/sta/fix_cpp_32
6 years ago
Double_V 54cab7b1cc
Merge pull request #972 from LDOUBLEV/fixocr
6 years ago
LDOUBLEV 4f2076421c fix lite doc
6 years ago
xiaoting 112bf885a6
Merge pull request #966 from tink2123/fix_android_demo
6 years ago
tink2123 95df6be916 fix android demo
6 years ago
dyning 35d65936a6
Update README_ch.md
6 years ago
littletomatodonkey 5760f73be6 fix 1e-5
6 years ago
MissPenguin 183dbfbec6
Update README_ch.md
6 years ago
MissPenguin d7348ef754
Update README_ch.md
6 years ago
dyning 642e6e31c9
Merge pull request #958 from grasswolfs/update_joinus_1019
6 years ago
grasswolfs 1f6a0e57e0 test=develop, test=document_fix
6 years ago
grasswolfs a337e12db2 test=develop, test=document_fix
6 years ago
MissPenguin c21081fdfc
Merge pull request #957 from wangjiawei04/ocr_1019
6 years ago
MissPenguin 2e0f96969c
Merge pull request #955 from MissPenguin/develop
6 years ago
MissPenguin ca4ef2c8d1 update faq
6 years ago
wangjiawei04 ba5d50f537 remove OCRReader
6 years ago
xiaoting 1bf6862daf
Merge pull request #948 from tink2123/fix_max_wh
6 years ago
xiaoting a29081aad9
Merge pull request #954 from Mejans/develop
6 years ago
MissPenguin 69a4caed49 update faq
6 years ago
Double_V 2ec51b2dc2
Merge pull request #937 from LDOUBLEV/fixocr
6 years ago
Mejans d8d5b0b930
Corpus of words for Occitan
6 years ago
Mejans a2385f7178
Occitan alphabet and characters
6 years ago
tink2123 c6c28785b1 fix max_wh_ratio for predict
6 years ago
tink2123 bb98fafffb fix max_wh_ratio for predict
6 years ago
littletomatodonkey 0fac210b85
Merge pull request #942 from tink2123/fix_ratio
6 years ago
tink2123 a502db33ac fix max_img_ratio for short text
6 years ago
LDOUBLEV dee8a0d28d fix ry
6 years ago
littletomatodonkey f4986cb14e
Merge pull request #940 from littletomatodonkey/sta/fix_tia
6 years ago
xiaoting 2177fcdcdb
Merge pull request #939 from milkliker/develop
6 years ago
littletomatodonkey 1b7a16a8b9 fix tia exception
6 years ago
Zhao Jun bea355c862
fix method name bug
6 years ago
LDOUBLEV 74915ac129 update infer library and doc for lite deploy
6 years ago
xiaoting 65a472cd7c
Merge pull request #923 from tink2123/add_dict_folder
6 years ago
gaotingquan c3061718dd Fix README about using Paddle-Lite to deploy
6 years ago
tink2123 661dab426b polish doc
6 years ago
tink2123 4ac60f9eda add corpus floder, modified depoly doc
6 years ago
MissPenguin 1fde1258d0
Merge pull request #905 from wangjiawei04/ocr_1008
6 years ago
tink2123 9b6abc12cd add dict and corpus folder
6 years ago
wangjiawei04 eb2f719de1 ocr 1012
6 years ago
Double_V d75761b1ad
Merge pull request #919 from WenmuZhou/fix_doc
6 years ago
WenmuZhou ea55e1d485 fix link in quickstart doc, test=document_fix
6 years ago
dyning 0e4ae332c5
Merge pull request #892 from DenDen047/patch-1
6 years ago
dyning fd20a036a7
Merge pull request #890 from androiddevnotesforks/develop
6 years ago
DenDen047 264785838c
Update installation_en.md
6 years ago
Android Dev Notes 24569f687c
Fix typos
6 years ago
Double_V 31eee98cba
Merge pull request #871 from lidanqing-intel/develop-fix-omp-flag
6 years ago
lidanqing-intel 6b6df68ac6 change assert to WARNING
6 years ago
lidanqing-intel 2a7b74dc27 fix the indentation
6 years ago
lidanqing-intel e596c5cd7c improve omp test
6 years ago
lidanqing-intel 575e5d2a2b remove empty lines
6 years ago
lidanqing-intel 7c85970e7a add linux -fopenmp flag
6 years ago
lidanqing-intel dbf777c294 update
6 years ago
lidanqing-intel bfed1819a7 add /openmp for windows flag
6 years ago
dyning 2b16323080
Merge pull request #848 from tink2123/add_anno
6 years ago
tink2123 7f477619c0 fix typo
6 years ago
dyning 43874ba967
Merge pull request #847 from WenmuZhou/fix_cls_android_demo
6 years ago
littletomatodonkey d851f2c8d3
Merge pull request #858 from littletomatodonkey/fix_hub_serveing
6 years ago
littletomatodonkey ac1df3dbca fix hub serving draw
6 years ago
Daniel Yang e4b09948d1
Update FAQ.md
6 years ago
dyning 280cff56dc
Update README_ch.md
6 years ago
dyning 5da58b146c
Update README_ch.md
6 years ago
dyning 84a49ca05b
Update README.md
6 years ago
tink2123 fc512a84e3 add anno for rec
6 years ago
WenmuZhou ccd40ec85f set cls image_shape to 3,48,192
6 years ago
MissPenguin 8b64f4c2ea
Merge pull request #843 from LDOUBLEV/fixocr
6 years ago
Double_V 0c8bdc0885
Merge pull request #840 from lgcy/lgc_dev
6 years ago
Double_V e634afe76c
Merge pull request #839 from baiyfbupt/qat_issue
6 years ago
LDOUBLEV d0d0c4f95c update lite nb file,test=document_fix
6 years ago
baiyfbupt 3ec7d48c0f code refine
6 years ago
lgcy 3218b48148 fix lite crash bug
6 years ago
baiyfbupt 02ae18abf9 fix quant module
6 years ago
littletomatodonkey 815f20b550
Merge pull request #834 from tink2123/fix_srn
6 years ago
tink2123 5f8c3e07d9 fix srn fpn
6 years ago
tink2123 a5fbd902fe fix srn fpn
6 years ago
MissPenguin 5e25ed64a2
Update readme_en.md
6 years ago
littletomatodonkey 47703d16ce
Merge pull request #820 from littletomatodonkey/fix_cpp_doc
6 years ago
MissPenguin 764d8f5fc2
Update params.py
6 years ago
MissPenguin 2c35dafeb5
Update params.py
6 years ago
MissPenguin 358182a6d1
Update params.py
6 years ago
littletomatodonkey 829fe749cc test=document_fix, improve cpp infer doc
6 years ago
MissPenguin 8750361a5d
Merge pull request #817 from LDOUBLEV/fixocr
6 years ago
littletomatodonkey ecad10eb02
Merge pull request #816 from littletomatodonkey/add_tia
6 years ago
MissPenguin 51b57c47c7
Update utility.py
6 years ago
MissPenguin 04c5c6ab3b
Merge pull request #797 from wangjiawei04/ocr_0923
6 years ago
LDOUBLEV 1af833e2b6 fix doc typo
6 years ago
Jiawei Wang 63e4074ab4
Update serving_inference.md
6 years ago
Double_V 58e0a62799
Merge pull request #808 from baiyfbupt/patch-1
6 years ago
Double_V c320457d73
Merge pull request #810 from yukavio/develop
6 years ago
Jiawei Wang 83c420bf31
Update serving_inference.md
6 years ago
wangjiawei04 c67d04ad6e adapt to mobile model
6 years ago
Jiawei Wang e11b8aff79
Update serving_inference.md
6 years ago
littletomatodonkey 43f6ab7a63 fix gen label
6 years ago
wangjiawei04 62f85ec0bd remove utility
6 years ago
Double_V 115b517584
Merge pull request #814 from littletomatodonkey/add_tia
6 years ago
wangjiawei04 0005f4d171 add inference to serving model tool
6 years ago
yukavio 2d07a0bcb9 fix slim prune
6 years ago
MissPenguin 5d202e44d7
Merge pull request #811 from LDOUBLEV/fixocr
6 years ago
MissPenguin d93f006212
Update README_ch.md
6 years ago
MissPenguin 9411df5ae7
Merge pull request #815 from MissPenguin/develop
6 years ago
MissPenguin f196376249 update readme
6 years ago
littletomatodonkey 3a18b08fc5 fix warn
6 years ago
littletomatodonkey 896e573975 add tia aug
6 years ago
MissPenguin 2dfb1cfaa1
Update README_ch.md
6 years ago
Double_V e266466a9a
Merge pull request #802 from TingquanGao/develop
6 years ago
MissPenguin f94ebce2f5
Merge pull request #813 from MissPenguin/develop
6 years ago
MissPenguin 29405e325d update readme
6 years ago
LDOUBLEV d8b9e7a063 add faq
6 years ago
MissPenguin 10808204cd update readme
6 years ago
LDOUBLEV 0de72f5d97 opt doc
6 years ago
LDOUBLEV 6e87c90486 fix bad download link, opt lite doc
6 years ago
MissPenguin 90f30dbeb6
Merge pull request #809 from nblib/develop
6 years ago
nblib f7ae9a5fb3 Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleOCR into develop-nblib
6 years ago
yukavio c58fb6e822 update bash of slim pruning
6 years ago
nblib b7e9a81a05 add label tool
6 years ago
Bai Yifan 1063ecbee3
Update README.md
6 years ago
xiaoting 9bcba212b2
Merge pull request #800 from tink2123/add_multi_imgs
6 years ago
wangjiawei04 e53c427330 fix rec local
6 years ago
Tingquan Gao ac439ae1aa
fix path error
6 years ago
wangjiawei04 95f820b835 CLOSE data augment if use pdserving
6 years ago
wangjiawei04 f7dbf2b702 CLOSE data augment if use pdserving
6 years ago
wangjiawei04 3a347ebc3a fix doc
6 years ago
wangjiawei04 a52587d91f fix doc
6 years ago
wangjiawei04 e5fcccc495 Merge branch 'ocr_0923' of https://github.com/wangjiawei04/PaddleOCR into ocr_0923
6 years ago
wangjiawei04 7e97976ce6 fix doc
6 years ago
Jiawei Wang 0d12338fa9
Merge branch 'develop' into ocr_0923
6 years ago
wangjiawei04 4d1e17e70b fix doc
6 years ago
wangjiawei04 c4720557e8 fix all minor bugs
6 years ago
tink2123 8ed0882996 add multi-imgs
6 years ago
MissPenguin ac7e9dd9f2
Merge pull request #799 from tink2123/update_dict
6 years ago
tink2123 4a839b9d92 update clas_train link
6 years ago
tink2123 60763646b9 update clas link
6 years ago
littletomatodonkey 97c767ccfb
Merge pull request #798 from littletomatodonkey/fix_reco_doc
6 years ago
tink2123 853f6db37d fix srn typo
6 years ago
tink2123 0eab30cb17 update japan and korean dict
6 years ago
littletomatodonkey 571275e03c fix visualize
6 years ago
Daniel Yang bad8211491
Update README.md
6 years ago
Daniel Yang 6825ee4e11
Update visualization_en.md
6 years ago
Daniel Yang d9e005d2a7
Update visualization.md
6 years ago
wangjiawei04 7cacfc97d9 first commit
6 years ago
MissPenguin bb7eca34e7
Merge pull request #796 from tink2123/model_list
6 years ago
tink2123 f37745ff7c update model list
6 years ago
MissPenguin fa53bc3817
Update README.md
6 years ago
dyning 72faa11b77
Merge pull request #792 from LDOUBLEV/fixslim
6 years ago
Double_V 89ea21bf9e
Merge pull request #791 from LDOUBLEV/fixocr
6 years ago
dyning b195d7586f
Update update_en.md
6 years ago
dyning 667d393ecf
Update README.md
6 years ago
dyning e8a649ab5b
Update update.md
6 years ago
dyning 580a973841
Update README_ch.md
6 years ago
dyning 4fb914dafe
Update README_ch.md
6 years ago
dyning 8b74966a28
Update README_ch.md
6 years ago
dyning 706b25bff3
Update README.md
6 years ago
Daniel Yang 250412a408
Update README_ch.md
6 years ago
dyning 0f86cebb57
Update README.md
6 years ago
LDOUBLEV 03125024cc fix lite doc, test=document_fix
6 years ago
Daniel Yang e10e788855
Merge pull request #790 from tink2123/fix_typo_and_polish_infer
6 years ago
LDOUBLEV 732bb6eb21 fix ch doc, test=document_doc
6 years ago
xiaoting e8ba14955c
Merge branch 'develop' into fix_typo_and_polish_infer
6 years ago
LDOUBLEV 3f89879c19 add slim introduction,test=document_fix
6 years ago
Daniel Yang 1cc991e5a8
Update recognition.md
6 years ago
LDOUBLEV cf8bc662de fix type
6 years ago
LDOUBLEV 80608bd618 fix slim doc, test=develop
6 years ago
MissPenguin a9e7c8f923
Merge pull request #793 from MissPenguin/develop
6 years ago
MissPenguin a6db27161a update detection.md for v1.1
6 years ago
LDOUBLEV 7d5ce84956 fix conflicts
6 years ago
LDOUBLEV bd2370f1b9 fix ocr slim doc
6 years ago
MissPenguin 6be762d6a0
Merge pull request #783 from yukavio/develop
6 years ago
yukavio 4ac63947c4 add some content to slim doc
6 years ago
MissPenguin de05f4fa43
Merge pull request #782 from tink2123/update_doc_new
6 years ago
MissPenguin 0a6537845b
Merge pull request #774 from WenmuZhou/fix_whl_doc1
6 years ago
tink2123 e5d7571503 fix typo and add srn for inference,test=document_fix
6 years ago
LDOUBLEV 3d11aba92d fix lite doc, test=document_fix
6 years ago
MissPenguin d8ac92cdad
Merge pull request #789 from MissPenguin/develop
6 years ago
Daniel Yang 03960fde89
Update README_ch.md
6 years ago
MissPenguin c66b97f840 rename det_r18_vd_db_v1.1.yml
6 years ago
xiaoting 1614282b23
Merge pull request #768 from littletomatodonkey/fix_direection_cls_doc
6 years ago
MissPenguin 96c2e3f136
Merge pull request #776 from MissPenguin/develop
6 years ago
Double_V 3b286e70c3
Merge pull request #786 from LDOUBLEV/fixocr
6 years ago
tink2123 6af341a37b change pip source, test=document_fix
6 years ago
LDOUBLEV f4d826a5f3 fix doc, test=document_fix
6 years ago
littletomatodonkey a0f13f4340 fix recognition doc
6 years ago
yukavio f6408e11e1 complete the doc of sensitivity analysis
6 years ago
littletomatodonkey 25d7eb87c2 fix det path
6 years ago
MissPenguin bcc8f208ec add det_mv3_db_v1.1.yml & update config link for rec model
6 years ago
WenmuZhou a38de9bdbe update doc
6 years ago
WenmuZhou 278530239d update doc
6 years ago
tink2123 b578edd6a1 fix typo
6 years ago
dyning 6ac1497a31
Update README_ch.md
6 years ago
yukavio 3e3d06b606 refine prune doc
6 years ago
dyning 16352beb89
Update README.md
6 years ago
littletomatodonkey f57e23a902 fix inference doc
6 years ago
tink2123 75fde81704 update doc for install and angle_class
6 years ago
Double_V e086071da2
Merge pull request #778 from LDOUBLEV/fixslim
6 years ago
dyning 36fbabb108
Merge pull request #781 from dyning/develop
6 years ago
dyning f0ce9b90ef add PPOCR doc
6 years ago
littletomatodonkey 706cfe8391 fix cls link
6 years ago
littletomatodonkey 7831f18b08 fix recognition.md
6 years ago
LDOUBLEV 954c3313d2 fix predict det
6 years ago
littletomatodonkey d7080099e9 revert config
6 years ago
LDOUBLEV bc7dd36e0e rename readme
6 years ago
LDOUBLEV afc752248b opt slim doc and add res18 yml
6 years ago
Double_V e600d787f5
Merge pull request #770 from LDOUBLEV/fixocr
6 years ago
littletomatodonkey dcbc20e20e add quick start en model
6 years ago
MissPenguin 28cfb93df5
Merge pull request #772 from MissPenguin/develop
6 years ago
MissPenguin 6b35afb50a add config in models list
6 years ago
WenmuZhou 47f9972a20 update pip to pip3
6 years ago
WenmuZhou 5fa8b5c666 update python to python3
6 years ago
MissPenguin e01a4b623d update hubserving readme and params
6 years ago
WenmuZhou 15be2fb979 update whl doc
6 years ago
littletomatodonkey 0439dfb112 add yaml
6 years ago
MissPenguin 2681ad5f90 update algorithm overview
6 years ago
LDOUBLEV 8e90a40547 opt lite demo doc
6 years ago
littletomatodonkey 9028077999 fix qs
6 years ago
littletomatodonkey 17e722de59 fix table format
6 years ago
zhoujun 3fb28d2a87
Merge pull request #9 from PaddlePaddle/develop
6 years ago
Double_V 9228a49342
Merge pull request #767 from WenmuZhou/fix_readme1
6 years ago
littletomatodonkey f4d2ebcb3a fix quick start
6 years ago
zhoujun 3dce09ead4
Update README_ch.md
6 years ago
zhoujun 3d43a760e6
Update README.md
6 years ago
zhoujun 136ff79047
Merge pull request #8 from PaddlePaddle/develop
6 years ago
dyning 1a19bce923
Update README.md
6 years ago
dyning d181c7a3ed
Update README_ch.md
6 years ago
dyning b254cdb73a
Update README_ch.md
6 years ago
dyning fb2c33bcb1
Update README.md
6 years ago
dyning d6b83901fc
Update README.md
6 years ago
dyning bb873ce14d
Update README.md
6 years ago
dyning f3bac1b981
Merge pull request #765 from grasswolfs/update_readme_en_0920
6 years ago
dyning 0983ca7ad2
Merge pull request #764 from tink2123/add_en_doc
6 years ago
grasswolfs 3cfffcb5c5 test=develop, test=update_readme_en_0920
6 years ago
tink2123 21d0869b6e add en doc for rec
6 years ago
MissPenguin 30648fbc84
Update models_list_en.md
6 years ago
MissPenguin 60967e8b77
Update models_list.md
6 years ago
dyning 9295e25091
Update benchmark_en.md
6 years ago
dyning c762ca4707
Merge pull request #762 from LDOUBLEV/fixocr
6 years ago
LDOUBLEV 17e5df1de3 mv en.doc to ./doc_en
6 years ago
dyning d53dcb225e
Update benchmark.md
6 years ago
dyning 5ea014f5bf
Merge pull request #761 from LDOUBLEV/fixocr
6 years ago
LDOUBLEV fe35728b7d add framework.png
6 years ago
LDOUBLEV a8c8ec1f82 Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleOCR into fixocr
6 years ago
LDOUBLEV 0f8dc0a622 update benchmark and doc.jpg
6 years ago
MissPenguin 1ee51e2f56
Update README_en.md
6 years ago
MissPenguin 3872da8de0
Update README_en.md
6 years ago
MissPenguin bf60c4e7e3
Update README.md
6 years ago
MissPenguin 64ae0c4e38
Merge pull request #759 from grasswolfs/update_doc_0919
6 years ago
MissPenguin 7cfc0b910b
Merge pull request #760 from yukavio/develop
6 years ago
grasswolfs ad1aca64d3 test=develop, test=document_fix
6 years ago
grasswolfs 72e4f3643b Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleOCR into update_doc_0919
6 years ago
grasswolfs eef60848ba test=develop, test=document_fix
6 years ago
Double_V d64a4c3f6d
Merge pull request #756 from LDOUBLEV/fixocr
6 years ago
yukavio f27b7edd99 refine slim prune doc
6 years ago
yukavio 37f5ff9696 Merge remote-tracking branch 'upstream/develop' into develop
6 years ago
yukavio dc0aea4ec3 refine slim prune doc
6 years ago
grasswolfs 1a024c69c7 test=develop, test=document_fix
6 years ago
littletomatodonkey edd4c33f4a
Merge pull request #757 from littletomatodonkey/fix_whl_language
6 years ago
MissPenguin b287673a0b
Merge pull request #758 from MissPenguin/develop
6 years ago
MissPenguin 2a03948d7c update docs
6 years ago
littletomatodonkey 2ee7dcb53a fix cpp infer doc for cls
6 years ago
Daniel Yang 7a45786ab7
Update README.md
6 years ago
Daniel Yang 1392c9c477
Update README.md
6 years ago
dyning ad545e52f2
Merge pull request #729 from tink2123/tree
6 years ago
littletomatodonkey 24dfd8b2b2 fix whl doc and add multi-language
6 years ago
dyning de5c741a91
Merge pull request #753 from baiyfbupt/doc
6 years ago
LDOUBLEV b6289d0eb0 advance db post_process
6 years ago
MissPenguin 77cd8c1e66
Merge pull request #754 from tink2123/lan_doc
6 years ago
MissPenguin 0d17196f94
Merge pull request #755 from MissPenguin/develop
6 years ago
MissPenguin 84576471c3 modify hubserving doc
6 years ago
MissPenguin 1fd763f89b
Merge pull request #752 from MissPenguin/develop
6 years ago
tink2123 8e53734f35 update model_list
6 years ago
MissPenguin 235b3aff8e
Merge pull request #749 from tink2123/make_label
6 years ago
MissPenguin e9a39e2d27 modify hubserving doc
6 years ago
MissPenguin ae68afd622 modify hubserving doc
6 years ago
MissPenguin 06feb23dff modify hubserving doc
6 years ago
tink2123 821149e090 update model list
6 years ago
tink2123 98c01dabce add doc and font for languages
6 years ago
baiyfbupt 2b68ae333a refine slim readme
6 years ago
MissPenguin b063599418 remove det_mv3_db_v1.1.yml & add code annotation
6 years ago
Daniel Yang 3942482e2d
Update README.md
6 years ago
Daniel Yang 78a428dce6
Update visualization.md
6 years ago
Daniel Yang aee0a1fe96
Update README.md
6 years ago
Daniel Yang be6e69a84f
Update README.md
6 years ago
Double_V f1c4f413be
Merge pull request #751 from yukavio/develop
6 years ago
littletomatodonkey aafa88db70
Merge pull request #746 from tink2123/languages
6 years ago
MissPenguin a6ccaa513e
Merge pull request #750 from grasswolfs/update_readme_0918
6 years ago
tink2123 cf054cffc1 add copyright
6 years ago
tink2123 f9170fcfce polish gen_label
6 years ago
tink2123 289bf76067 add stride and mv to languages
6 years ago
yukavio 9958fdde66 fix some bug
6 years ago
grasswolfs f415f5fcb6 test=develop, test=document_fix
6 years ago
yukavio cf7372475e complete prune doc
6 years ago
grasswolfs 3e1d8f2dee test=develop, test=document_fix
6 years ago
grasswolfs 9cd6e11b3e test=develop, test=document_fix
6 years ago
grasswolfs a63d91c83f test=develop, test=document_fix
6 years ago
tink2123 4d816b6149 make label for paddleocr
6 years ago
MissPenguin 4559f16ec7
Merge pull request #741 from WenmuZhou/whl
6 years ago
MissPenguin 867a60f474
Merge pull request #747 from littletomatodonkey/fix_vis
6 years ago
littletomatodonkey 4a81e9481c fix docker link
6 years ago
tink2123 1edfc308b1 add languages
6 years ago
WenmuZhou cf2a483369 分类支持传参置信度
6 years ago
WenmuZhou 06430c9359 ppocr支持多语言切换
6 years ago
MissPenguin b10bd395c9
Update models_list.md
6 years ago
MissPenguin d4c47e2f50
Merge pull request #744 from wangjiawei04/pdserving_readme
6 years ago
MissPenguin b479372cd3
Merge pull request #745 from MissPenguin/develop
6 years ago
root 2cdf7a666e add models_list.md
6 years ago
root 76b8bb7ef1 add models_list.md
6 years ago
Jiawei Wang e01515599b
Update readme.md
6 years ago
tink2123 e3ac559430 update tree
6 years ago
WenmuZhou 79180223dc 更新分类模型地址
6 years ago
MissPenguin df14801b43
Merge pull request #740 from MissPenguin/develop
6 years ago
root c5f9b69c4e add db mv3 yml for v1.1
6 years ago
WenmuZhou ede5a3f4b6 更新检测识别模型地址
6 years ago
MissPenguin b8ed953142 modify cls model path
6 years ago
Double_V 42f0219cda
Merge pull request #719 from yukavio/develop
6 years ago
WenmuZhou bf60cd827b whl包添加分类模型
6 years ago
yukavio a3dee6a4b1 remove env flags
6 years ago
yukavio b8bf9b2c66 add sensitivity ratio
6 years ago
lichenxia fd76c1234b disable se & add cls params for hub serving
6 years ago
tink2123 6b906ad239 add tree for repo
6 years ago
tink2123 27384a5a5d add tree for repo
6 years ago
WenmuZhou ecba3f85d6 Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleOCR into whl
6 years ago
MissPenguin 5b5b72e651
Update inference.md
6 years ago
MissPenguin 594d34f5ed
Merge pull request #708 from WenmuZhou/angle_class
6 years ago
xiaoting cb1cc43259
Merge pull request #718 from tink2123/save_log
6 years ago
WenmuZhou 227f5f3a36 Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleOCR into master
6 years ago
yukavio d9d51f7daf rm eval_det_utils
6 years ago
Double_V 0da95ed13b
Merge pull request #717 from baiyfbupt/slim_qat
6 years ago
WenmuZhou 5d248b168f 解决冲突
6 years ago
WenmuZhou 99f253bc41 添加方向分类器inference文档
6 years ago
WenmuZhou c7819af417 对输出的scores和label进行顺序判断
6 years ago
WenmuZhou 25ff7eb517 添加方向分类器导出支持
6 years ago
tink2123 f8e01b2ea7 polish doc
6 years ago
MissPenguin 00a889e166
Merge pull request #610 from BeyondYourself/develop
6 years ago
Double_V a88764eae4
Merge pull request #721 from littletomatodonkey/fix_mkldnn
6 years ago
littletomatodonkey dbbfe96761
Merge pull request #722 from LDOUBLEV/fixocr
6 years ago
littletomatodonkey 2aa0c8eb2d remove re-init
6 years ago
littletomatodonkey 5858441b3d add notes
6 years ago
littletomatodonkey f78678dd66 fix py infer
6 years ago
LDOUBLEV 74f983d182 mv docker to deploy/docker
6 years ago
littletomatodonkey a7e915bf7b fix mklnn memory leak
6 years ago
yukavio d4f1758d55 add slim/prune
6 years ago
baiyfbupt 14dfa73e07 fix issue
6 years ago
baiyfbupt 2ac3ec96f4 fix issue
6 years ago
tink2123 eafa136cf1 update doc for saving log
6 years ago
baiyfbupt 2c6f0b0d55 add slim quantization
6 years ago
WenmuZhou f3f2b38efb 方向分类器设为默认不启用
6 years ago
WenmuZhou 03979d71d2 修改文件头
6 years ago
WenmuZhou 742cb9a3c6 移除注释和删掉不用的代码
6 years ago
WenmuZhou 74f6a5cb3d merge paddleocr
6 years ago
WenmuZhou 144b022fb6 添加分类模型
6 years ago
xiaoting ed6b2f0c71
Merge pull request #700 from tink2123/fix_doc
6 years ago
tink2123 fc9933354d update rec doc
6 years ago
Double_V d31effaf97
Merge pull request #600 from LDOUBLEV/fixocr
6 years ago
xiaoting 5fb3c419c9
Merge pull request #665 from tink2123/support_srn_inference
6 years ago
tink2123 5fc9fff98f Merge branch 'support_srn_inference' of https://github.com/tink2123/PaddleOCR
6 years ago
tink2123 29e2fed39c update code
6 years ago
xiaoting f265f94c65
Merge branch 'develop' into support_srn_inference
6 years ago
tink2123 aa7e9ac34e polish code
6 years ago
tink2123 bc1ad20701 support srn inference
6 years ago
littletomatodonkey 21af7660b5
Merge pull request #662 from littletomatodonkey/rm_readme
6 years ago
littletomatodonkey 7165f5899d rm duplicate readme
6 years ago
MissPenguin 4009fcf3d0
Merge pull request #654 from LiXiaYu/patch-1
6 years ago
dyning 3ebf46dae6
Update README_en.md
6 years ago
LiXiaYu f76ef16e9f
Update serving.md
6 years ago
WenmuZhou 567c74c508 修复cpp_infer的bug
6 years ago
WenmuZhou 54d562bfd9 merge PaddleOCR
6 years ago
dyning c75ad203e9
Update README_en.md
6 years ago
dyning e33026f38a
Update README.md
6 years ago
dyning 78f894f607
Merge pull request #648 from grasswolfs/revise_joinus_png
6 years ago
grasswolfs 725b17a111 test=develop, test=document_fix
6 years ago
WenmuZhou e11b2108fa 添加分类模型
6 years ago
shaohua.zhang 93df86ca9a
Update sast_process.py
6 years ago
shaohua.zhang f27c147fd6
fix the file read
6 years ago
shaohua.zhang efa97b6939
Update rec_icdar15_train.yml
6 years ago
shaohua.zhang dd39d1fd97
Update utility.py
6 years ago
shaohua.zhang 17f37b138a
fix the path
6 years ago
shaohua.zhang f7cf83eab3
Merge pull request #15 from BeyondYourself/revert-14-BeyondYourself-patch-1
6 years ago
shaohua.zhang 7bfbbe47bc
Revert "fix the path "
6 years ago
shaohua.zhang bf9833bd94
Merge pull request #14 from BeyondYourself/BeyondYourself-patch-1
6 years ago
shaohua.zhang 935966a2c2
fix the path
6 years ago
shaohua.zhang e0bf9c9cfa
Merge pull request #13 from PaddlePaddle/develop
6 years ago
LDOUBLEV fef18931bd fix faq
6 years ago
LDOUBLEV f893d5bb86 fix FAQ
6 years ago
LDOUBLEV ff6ba9edcc Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleOCR into fixocr
6 years ago
shaohua.zhang 6887a320a5
Delete duplicate function
6 years ago
shaohua.zhang ea91f26f06
Merge pull request #12 from PaddlePaddle/develop
6 years ago
LDOUBLEV 59cdce6a88 fix bug in randomcropdata func
6 years ago
shaohua.zhang 91341b81bd
Merge pull request #11 from PaddlePaddle/develop
6 years ago

@ -0,0 +1,35 @@
# ex: set ts=8 noet:
all: qt5 test
test: testpy3
testpy2:
python -m unittest discover tests
testpy3:
python3 -m unittest discover tests
qt4: qt4py2
qt5: qt5py3
qt4py2:
pyrcc4 -py2 -o libs/resources.py resources.qrc
qt4py3:
pyrcc4 -py3 -o libs/resources.py resources.qrc
qt5py3:
pyrcc5 -o libs/resources.py resources.qrc
clean:
rm -rf ~/.labelImgSettings.pkl *.pyc dist labelImg.egg-info __pycache__ build
pip_upload:
python3 setup.py upload
long_description:
restview --long-description
.PHONY: all

File diff suppressed because it is too large Load Diff

@ -0,0 +1,134 @@
[English](README.md) | 简体中文
# PPOCRLabel
PPOCRLabel是一款适用于OCR领域的半自动化图形标注工具使用python3和pyqt5编写支持矩形框标注和四点标注模式导出格式可直接用于PPOCR检测和识别模型的训练。
<img src="./data/gif/steps.gif" width="100%"/>
#### 近期更新
- 2020.12.18: 支持对单个标记框进行重新识别by [ninetailskim](https://github.com/ninetailskim) ),完善快捷键。
## 安装
### 1. 安装PaddleOCR
参考[PaddleOCR安装文档](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/installation.md)准备好PaddleOCR
### 2. 安装PPOCRLabel
#### Windows + Anaconda
```
pip install pyqt5
cd ./PPOCRLabel # 将目录切换到PPOCRLabel文件夹下
python PPOCRLabel.py --lang ch
```
#### Ubuntu Linux
```
pip3 install pyqt5
pip3 install trash-cli
cd ./PPOCRLabel # 将目录切换到PPOCRLabel文件夹下
python3 PPOCRLabel.py --lang ch
```
#### macOS
```
pip3 install pyqt5
pip3 uninstall opencv-python # 由于mac版本的opencv与pyqt有冲突需先手动卸载opencv
pip3 install opencv-contrib-python-headless # 安装headless版本的open-cv
cd ./PPOCRLabel # 将目录切换到PPOCRLabel文件夹下
python3 PPOCRLabel.py --lang ch
```
## 使用
### 操作步骤
1. 安装与运行:使用上述命令安装与运行程序。
2. 打开文件夹:在菜单栏点击 “文件” - "打开目录" 选择待标记图片的文件夹<sup>[1]</sup>.
3. 自动标注:点击 ”自动标注“使用PPOCR超轻量模型对图片文件名前图片状态<sup>[2]</sup>为 “X” 的图片进行自动标注。
4. 手动标注:点击 “矩形标注”(推荐直接在英文模式下点击键盘中的 “W”)用户可对当前图片中模型未检出的部分进行手动绘制标记框。点击键盘Q则使用四点标注模式或点击“编辑” - “四点标注”用户依次点击4个点后双击左键表示标注完成。
5. 标记框绘制完成后,用户点击 “确认”,检测框会先被预分配一个 “待识别” 标签。
6. 重新识别:将图片中的所有检测画绘制/调整完成后,点击 “重新识别”PPOCR模型会对当前图片中的**所有检测框**重新识别<sup>[3]</sup>
7. 内容更改:双击识别结果,对不准确的识别结果进行手动更改。
8. 确认标记:点击 “确认”,图片状态切换为 “√”,跳转至下一张(此时不会直接将结果写入文件)。
9. 删除:点击 “删除图像”,图片将会被删除至回收站。
10. 保存结果:用户可以通过菜单中“文件-保存标记结果”手动保存同时程序也会在用户每确认10张图片后自动保存一次。手动确认过的标记将会被存放在所打开图片文件夹下的*Label.txt*中。在菜单栏点击 “文件” - "保存识别结果"后,会将此类图片的识别训练数据保存在*crop_img*文件夹下,识别标签保存在*rec_gt.txt*中<sup>[4]</sup>
### 注意
[1] PPOCRLabel以文件夹为基本标记单位打开待标记的图片文件夹后不会在窗口栏中显示图片而是在点击 "选择文件夹" 之后直接将文件夹下的图片导入到程序中。
[2] 图片状态表示本张图片用户是否手动保存过,未手动保存过即为 “X”手动保存过为 “√”。点击 “自动标注”按钮后PPOCRLabel不会对状态为 “√” 的图片重新标注。
[3] 点击“重新识别”后,模型会对图片中的识别结果进行覆盖。因此如果在此之前手动更改过识别结果,有可能在重新识别后产生变动。
[4] PPOCRLabel产生的文件放置于标记图片文件夹下包括一下几种请勿手动更改其中内容否则会引起程序出现异常。
| 文件名 | 说明 |
| :-----------: | :----------------------------------------------------------: |
| Label.txt | 检测标签可直接用于PPOCR检测模型训练。用户每保存10张检测结果后程序会进行自动写入。当用户关闭应用程序或切换文件路径后同样会进行写入。 |
| fileState.txt | 图片状态标记文件,保存当前文件夹下已经被用户手动确认过的图片名称。 |
| Cache.cach | 缓存文件,保存模型自动识别的结果。 |
| rec_gt.txt | 识别标签。可直接用于PPOCR识别模型训练。需用户手动点击菜单栏“文件” - "保存识别结果"后产生。 |
| crop_img | 识别数据。按照检测框切割后的图片。与rec_gt.txt同时产生。 |
## 说明
### 快捷键
| 快捷键 | 说明 |
| ---------------- | ---------------------------- |
| Ctrl + shift + A | 自动标注所有未确认过的图片 |
| Ctrl + shift + R | 对当前图片的所有标记重新识别 |
| W | 新建矩形框 |
| Q | 新建四点框 |
| Ctrl + E | 编辑所选框标签 |
| Ctrl + R | 重新识别所选标记 |
| Backspace | 删除所选框 |
| Ctrl + V | 确认本张图片标记 |
| Ctrl + Shift + d | 删除本张图片 |
| D | 下一张图片 |
| A | 上一张图片 |
| Ctrl++ | 缩小 |
| Ctrl-- | 放大 |
| ↑→↓← | 移动标记框 |
### 内置模型
- 默认模型PPOCRLabel默认使用PaddleOCR中的中英文超轻量OCR模型支持中英文与数字识别多种语言检测。
- 模型语言切换:用户可通过菜单栏中 "PaddleOCR" - "选择模型" 切换内置模型语言,目前支持的语言包括法文、德文、韩文、日文。具体模型下载链接可参考[PaddleOCR模型列表](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/models_list.md).
- 自定义模型:用户可根据[自定义模型代码使用](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/whl.md#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%A8%A1%E5%9E%8B)通过修改PPOCRLabel.py中针对[PaddleOCR类的实例化](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/PPOCRLabel/PPOCRLabel.py#L110)替换成自己训练的模型。
### 导出部分识别结果
针对部分难以识别的数据,通过在识别结果的复选框中**取消勾选**相应的标记,其识别结果不会被导出。
*注意:识别结果中的复选框状态仍需用户手动点击保存后才能保留*
### 错误提示
- 如果同时使用whl包安装了paddleocr其优先级大于通过paddleocr.py调用PaddleOCR类whl包未更新时会导致程序异常。
- PPOCRLabel**不支持对中文文件名**的图片进行自动标注。
- 针对Linux用户如果您在打开软件过程中出现**objc[XXXXX]**开头的错误证明您的opencv版本太高建议安装4.2版本:
```
pip install opencv-python==4.2.0.32
```
- 如果出现 ```Missing string id``` 开头的错误,需要重新编译资源:
```
pyrcc5 -o libs/resources.py resources.qrc
```
- 如果出现``` module 'cv2' has no attribute 'INTER_NEAREST'```错误需要首先删除所有opencv相关包然后重新安装headless版本的opencv
```
pip install opencv-contrib-python-headless
```
### 参考资料
1.[Tzutalin. LabelImg. Git code (2015)](https://github.com/tzutalin/labelImg)

@ -0,0 +1,153 @@
English | [简体中文](README_ch.md)
# PPOCRLabel
PPOCRLabel is a semi-automatic graphic annotation tool suitable for OCR field. It is written in python3 and pyqt5, supporting rectangular box annotation and four-point annotation modes. Annotations can be directly used for the training of PPOCR detection and recognition models.
<img src="./data/gif/steps_en.gif" width="100%"/>
### Recent Update
- 2020.12.18: Support re-recognition of a single label box (by [ninetailskim](https://github.com/ninetailskim) ), perfect shortcut keys.
## Installation
### 1. Install PaddleOCR
Refer to [PaddleOCR installation document](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/installation.md) to prepare PaddleOCR
### 2. Install PPOCRLabel
#### Windows + Anaconda
Download and install [Anaconda](https://www.anaconda.com/download/#download) (Python 3+)
```
pip install pyqt5
cd ./PPOCRLabel # Change the directory to the PPOCRLabel folder
python PPOCRLabel.py
```
#### Ubuntu Linux
```
pip3 install pyqt5
pip3 install trash-cli
cd ./PPOCRLabel # Change the directory to the PPOCRLabel folder
python3 PPOCRLabel.py
```
#### macOS
```
pip3 install pyqt5
pip3 uninstall opencv-python # Uninstall opencv manually as it conflicts with pyqt
pip3 install opencv-contrib-python-headless # Install the headless version of opencv
cd ./PPOCRLabel # Change the directory to the PPOCRLabel folder
python3 PPOCRLabel.py
```
## Usage
### Steps
1. Build and launch using the instructions above.
2. Click 'Open Dir' in Menu/File to select the folder of the picture.<sup>[1]</sup>
3. Click 'Auto recognition', use PPOCR model to automatically annotate images which marked with 'X' <sup>[2]</sup>before the file name.
4. Create Box:
4.1 Click 'Create RectBox' or press 'W' in English keyboard mode to draw a new rectangle detection box. Click and release left mouse to select a region to annotate the text area.
4.2 Press 'Q' to enter four-point labeling mode which enables you to create any four-point shape by clicking four points with the left mouse button in succession and DOUBLE CLICK the left mouse as the signal of labeling completion.
5. After the marking frame is drawn, the user clicks "OK", and the detection frame will be pre-assigned a "TEMPORARY" label.
6. Click 're-Recognition', model will rewrite ALL recognition results in ALL detection box<sup>[3]</sup>.
7. Double click the result in 'recognition result' list to manually change inaccurate recognition results.
8. Click "Check", the image status will switch to "√",then the program automatically jump to the next(The results will not be written directly to the file at this time).
9. Click "Delete Image" and the image will be deleted to the recycle bin.
10. Labeling result: the user can save manually through the menu "File - Save Label", while the program will also save automatically after every 10 images confirmed by the user.the manually checked label will be stored in *Label.txt* under the opened picture folder.
Click "PaddleOCR"-"Save Recognition Results" in the menu bar, the recognition training data of such pictures will be saved in the *crop_img* folder, and the recognition label will be saved in *rec_gt.txt*<sup>[4]</sup>.
### Note
[1] PPOCRLabel uses the opened folder as the project. After opening the image folder, the picture will not be displayed in the dialog. Instead, the pictures under the folder will be directly imported into the program after clicking "Open Dir".
[2] The image status indicates whether the user has saved the image manually. If it has not been saved manually it is "X", otherwise it is "√", PPOCRLabel will not relabel pictures with a status of "√".
[3] After clicking "Re-recognize", the model will overwrite ALL recognition results in the picture.
Therefore, if the recognition result has been manually changed before, it may change after re-recognition.
[4] The files produced by PPOCRLabel can be found under the opened picture folder including the following, please do not manually change the contents, otherwise it will cause the program to be abnormal.
| File name | Description |
| :-----------: | :----------------------------------------------------------: |
| Label.txt | The detection label file can be directly used for PPOCR detection model training. After the user saves 10 label results, the file will be automatically saved. It will also be written when the user closes the application or changes the file folder. |
| fileState.txt | The picture status file save the image in the current folder that has been manually confirmed by the user. |
| Cache.cach | Cache files to save the results of model recognition. |
| rec_gt.txt | The recognition label file, which can be directly used for PPOCR identification model training, is generated after the user clicks on the menu bar "File"-"Save recognition result". |
| crop_img | The recognition data, generated at the same time with *rec_gt.txt* |
## Explanation
### Shortcut keys
| Shortcut keys | Description |
| ---------------- | ------------------------------------------------ |
| Ctrl + shift + A | Automatically label all unchecked images |
| Ctrl + shift + R | Re-recognize all the labels of the current image |
| W | Create a rect box |
| Q | Create a four-points box |
| Ctrl + E | Edit label of the selected box |
| Ctrl + R | Re-recognize the selected box |
| Backspace | Delete the selected box |
| Ctrl + V | Check image |
| Ctrl + Shift + d | Delete image |
| D | Next image |
| A | Previous image |
| Ctrl++ | Zoom in |
| Ctrl-- | Zoom out |
| ↑→↓← | Move selected box |
### Built-in Model
- Default model: PPOCRLabel uses the Chinese and English ultra-lightweight OCR model in PaddleOCR by default, supports Chinese, English and number recognition, and multiple language detection.
- Model language switching: Changing the built-in model language is supportable by clicking "PaddleOCR"-"Choose OCR Model" in the menu bar. Currently supported languagesinclude French, German, Korean, and Japanese.
For specific model download links, please refer to [PaddleOCR Model List](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_en/models_list_en.md#multilingual-recognition-modelupdating)
- Custom model: The model trained by users can be replaced by modifying PPOCRLabel.py in [PaddleOCR class instantiation](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/PPOCRLabel/PPOCRLabel.py#L110) referring [Custom Model Code](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_en/whl_en.md#use-custom-model)
### Export partial recognition results
For some data that are difficult to recognize, the recognition results will not be exported by **unchecking** the corresponding tags in the recognition results checkbox.
*Note: The status of the checkboxes in the recognition results still needs to be saved manually by clicking Save Button.*
### Error message
- If paddleocr is installed with whl, it has a higher priority than calling PaddleOCR class with paddleocr.py, which may cause an exception if whl package is not updated.
- For Linux users, if you get an error starting with **objc[XXXXX]** when opening the software, it proves that your opencv version is too high. It is recommended to install version 4.2:
```
pip install opencv-python==4.2.0.32
```
- If you get an error starting with **Missing string id **,you need to recompile resources:
```
pyrcc5 -o libs/resources.py resources.qrc
```
- If you get an error ``` module 'cv2' has no attribute 'INTER_NEAREST'```, you need to delete all opencv related packages first, and then reinstall the headless version of opencv
```
pip install opencv-contrib-python-headless
```
### Related
1.[Tzutalin. LabelImg. Git code (2015)](https://github.com/tzutalin/labelImg)

@ -0,0 +1,46 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import sys
try:
from PyQt5.QtWidgets import QWidget, QHBoxLayout, QComboBox
except ImportError:
# needed for py3+qt4
# Ref:
# http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html
# http://stackoverflow.com/questions/21217399/pyqt4-qtcore-qvariant-object-instead-of-a-string
if sys.version_info.major >= 3:
import sip
sip.setapi('QVariant', 2)
from PyQt4.QtGui import QWidget, QHBoxLayout, QComboBox
class ComboBox(QWidget):
def __init__(self, parent=None, items=[]):
super(ComboBox, self).__init__(parent)
layout = QHBoxLayout()
self.cb = QComboBox()
self.items = items
self.cb.addItems(self.items)
self.cb.currentIndexChanged.connect(parent.comboSelectionChanged)
layout.addWidget(self.cb)
self.setLayout(layout)
def update_items(self, items):
self.items = items
self.cb.clear()
self.cb.addItems(self.items)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

@ -0,0 +1,2 @@
__version_info__ = ('1', '0', '0')
__version__ = '.'.join(__version_info__)

@ -0,0 +1,155 @@
try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
except ImportError:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import json
from libs.utils import newIcon
BB = QDialogButtonBox
class Worker(QThread):
progressBarValue = pyqtSignal(int)
listValue = pyqtSignal(str)
endsignal = pyqtSignal(int, str)
handle = 0
def __init__(self, ocr, mImgList, mainThread, model):
super(Worker, self).__init__()
self.ocr = ocr
self.mImgList = mImgList
self.mainThread = mainThread
self.model = model
self.setStackSize(1024*1024)
def run(self):
try:
findex = 0
for Imgpath in self.mImgList:
if self.handle == 0:
self.listValue.emit(Imgpath)
if self.model == 'paddle':
self.result_dic = self.ocr.ocr(Imgpath, cls=True, det=True)
# 结果保存
if self.result_dic is None or len(self.result_dic) == 0:
print('Can not recognise file is : ', Imgpath)
pass
else:
strs = ''
for res in self.result_dic:
chars = res[1][0]
cond = res[1][1]
posi = res[0]
strs += "Transcription: " + chars + " Probability: " + str(cond) + \
" Location: " + json.dumps(posi) +'\n'
# Sending large amounts of data repeatedly through pyqtSignal may affect the program efficiency
self.listValue.emit(strs)
self.mainThread.result_dic = self.result_dic
self.mainThread.filePath = Imgpath
# 保存
self.mainThread.saveFile(mode='Auto')
findex += 1
self.progressBarValue.emit(findex)
else:
break
self.endsignal.emit(0, "readAll")
self.exec()
except Exception as e:
print(e)
raise
class AutoDialog(QDialog):
def __init__(self, text="Enter object label", parent=None, ocr=None, mImgList=None, lenbar=0):
super(AutoDialog, self).__init__(parent)
self.setFixedWidth(1000)
self.parent = parent
self.ocr = ocr
self.mImgList = mImgList
self.pb = QProgressBar()
self.pb.setRange(0, lenbar)
self.pb.setValue(0)
layout = QVBoxLayout()
layout.addWidget(self.pb)
self.model = 'paddle'
self.listWidget = QListWidget(self)
layout.addWidget(self.listWidget)
self.buttonBox = bb = BB(BB.Ok | BB.Cancel, Qt.Horizontal, self)
bb.button(BB.Ok).setIcon(newIcon('done'))
bb.button(BB.Cancel).setIcon(newIcon('undo'))
bb.accepted.connect(self.validate)
bb.rejected.connect(self.reject)
layout.addWidget(bb)
bb.button(BB.Ok).setEnabled(False)
self.setLayout(layout)
# self.setWindowTitle("自动标注中")
self.setWindowModality(Qt.ApplicationModal)
# self.setWindowFlags(Qt.WindowCloseButtonHint)
self.thread_1 = Worker(self.ocr, self.mImgList, self.parent, 'paddle')
self.thread_1.progressBarValue.connect(self.handleProgressBarSingal)
self.thread_1.listValue.connect(self.handleListWidgetSingal)
self.thread_1.endsignal.connect(self.handleEndsignalSignal)
def handleProgressBarSingal(self, i):
self.pb.setValue(i)
def handleListWidgetSingal(self, i):
self.listWidget.addItem(i)
titem = self.listWidget.item(self.listWidget.count() - 1)
self.listWidget.scrollToItem(titem)
def handleEndsignalSignal(self, i, str):
if i == 0 and str == "readAll":
self.buttonBox.button(BB.Ok).setEnabled(True)
self.buttonBox.button(BB.Cancel).setEnabled(False)
def reject(self):
print("reject")
self.thread_1.handle = -1
self.thread_1.quit()
# del self.thread_1
# if self.thread_1.isRunning():
# self.thread_1.terminate()
# self.thread_1.quit()
# super(AutoDialog,self).reject()
while not self.thread_1.isFinished():
pass
self.accept()
def validate(self):
self.accept()
def postProcess(self):
try:
self.edit.setText(self.edit.text().trimmed())
# print(self.edit.text())
except AttributeError:
# PyQt5: AttributeError: 'str' object has no attribute 'trimmed'
self.edit.setText(self.edit.text())
print(self.edit.text())
def popUp(self):
self.thread_1.start()
return 1 if self.exec_() else None
def closeEvent(self, event):
print("???")
# if self.thread_1.isRunning():
# self.thread_1.quit()
#
# # self._thread.terminate()
# # del self.thread_1
# super(AutoDialog, self).closeEvent(event)
self.reject()

File diff suppressed because it is too large Load Diff

@ -0,0 +1,49 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import QColorDialog, QDialogButtonBox
except ImportError:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
BB = QDialogButtonBox
class ColorDialog(QColorDialog):
def __init__(self, parent=None):
super(ColorDialog, self).__init__(parent)
self.setOption(QColorDialog.ShowAlphaChannel)
# The Mac native dialog does not support our restore button.
self.setOption(QColorDialog.DontUseNativeDialog)
# Add a restore defaults button.
# The default is set at invocation time, so that it
# works across dialogs for different elements.
self.default = None
self.bb = self.layout().itemAt(1).widget()
self.bb.addButton(BB.RestoreDefaults)
self.bb.clicked.connect(self.checkRestore)
def getColor(self, value=None, title=None, default=None):
self.default = default
if title:
self.setWindowTitle(title)
if value:
self.setCurrentColor(value)
return self.currentColor() if self.exec_() else None
def checkRestore(self, button):
if self.bb.buttonRole(button) & BB.ResetRole and self.default:
self.setCurrentColor(self.default)

@ -0,0 +1,31 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
SETTING_FILENAME = 'filename'
SETTING_RECENT_FILES = 'recentFiles'
SETTING_WIN_SIZE = 'window/size'
SETTING_WIN_POSE = 'window/position'
SETTING_WIN_GEOMETRY = 'window/geometry'
SETTING_LINE_COLOR = 'line/color'
SETTING_FILL_COLOR = 'fill/color'
SETTING_ADVANCE_MODE = 'advanced'
SETTING_WIN_STATE = 'window/state'
SETTING_SAVE_DIR = 'savedir'
SETTING_PAINT_LABEL = 'paintlabel'
SETTING_LAST_OPEN_DIR = 'lastOpenDir'
SETTING_AUTO_SAVE = 'autosave'
SETTING_SINGLE_CLASS = 'singleclass'
FORMAT_PASCALVOC='PascalVOC'
FORMAT_YOLO='YOLO'
SETTING_DRAW_SQUARE = 'draw/square'
SETTING_LABEL_FILE_FORMAT= 'labelFileFormat'
DEFAULT_ENCODING = 'utf-8'

@ -0,0 +1,143 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env python
# -*- coding: utf8 -*-
import json
from pathlib import Path
from libs.constants import DEFAULT_ENCODING
import os
JSON_EXT = '.json'
ENCODE_METHOD = DEFAULT_ENCODING
class CreateMLWriter:
def __init__(self, foldername, filename, imgsize, shapes, outputfile, databasesrc='Unknown', localimgpath=None):
self.foldername = foldername
self.filename = filename
self.databasesrc = databasesrc
self.imgsize = imgsize
self.boxlist = []
self.localimgpath = localimgpath
self.verified = False
self.shapes = shapes
self.outputfile = outputfile
def write(self):
if os.path.isfile(self.outputfile):
with open(self.outputfile, "r") as file:
input_data = file.read()
outputdict = json.loads(input_data)
else:
outputdict = []
outputimagedict = {
"image": self.filename,
"annotations": []
}
for shape in self.shapes:
points = shape["points"]
x1 = points[0][0]
y1 = points[0][1]
x2 = points[1][0]
y2 = points[2][1]
height, width, x, y = self.calculate_coordinates(x1, x2, y1, y2)
shapedict = {
"label": shape["label"],
"coordinates": {
"x": x,
"y": y,
"width": width,
"height": height
}
}
outputimagedict["annotations"].append(shapedict)
# check if image already in output
exists = False
for i in range(0, len(outputdict)):
if outputdict[i]["image"] == outputimagedict["image"]:
exists = True
outputdict[i] = outputimagedict
break
if not exists:
outputdict.append(outputimagedict)
Path(self.outputfile).write_text(json.dumps(outputdict), ENCODE_METHOD)
def calculate_coordinates(self, x1, x2, y1, y2):
if x1 < x2:
xmin = x1
xmax = x2
else:
xmin = x2
xmax = x1
if y1 < y2:
ymin = y1
ymax = y2
else:
ymin = y2
ymax = y1
width = xmax - xmin
if width < 0:
width = width * -1
height = ymax - ymin
# x and y from center of rect
x = xmin + width / 2
y = ymin + height / 2
return height, width, x, y
class CreateMLReader:
def __init__(self, jsonpath, filepath):
self.jsonpath = jsonpath
self.shapes = []
self.verified = False
self.filename = filepath.split("/")[-1:][0]
try:
self.parse_json()
except ValueError:
print("JSON decoding failed")
def parse_json(self):
with open(self.jsonpath, "r") as file:
inputdata = file.read()
outputdict = json.loads(inputdata)
self.verified = True
if len(self.shapes) > 0:
self.shapes = []
for image in outputdict:
if image["image"] == self.filename:
for shape in image["annotations"]:
self.add_shape(shape["label"], shape["coordinates"])
def add_shape(self, label, bndbox):
xmin = bndbox["x"] - (bndbox["width"] / 2)
ymin = bndbox["y"] - (bndbox["height"] / 2)
xmax = bndbox["x"] + (bndbox["width"] / 2)
ymax = bndbox["y"] + (bndbox["height"] / 2)
points = [(xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax)]
self.shapes.append((label, points, None, None, True))
def get_shapes(self):
return self.shapes

@ -0,0 +1,40 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
except ImportError:
# needed for py3+qt4
# Ref:
# http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html
# http://stackoverflow.com/questions/21217399/pyqt4-qtcore-qvariant-object-instead-of-a-string
if sys.version_info.major >= 3:
import sip
sip.setapi('QVariant', 2)
from PyQt4.QtGui import *
from PyQt4.QtCore import *
# PyQt5: TypeError: unhashable type: 'QListWidgetItem'
class HashableQListWidgetItem(QListWidgetItem):
def __init__(self, *args):
super(HashableQListWidgetItem, self).__init__(*args)
def __hash__(self):
return hash(id(self))

@ -0,0 +1,107 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
except ImportError:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from libs.utils import newIcon, labelValidator
BB = QDialogButtonBox
class LabelDialog(QDialog):
def __init__(self, text="Enter object label", parent=None, listItem=None):
super(LabelDialog, self).__init__(parent)
self.edit = QLineEdit() # OLD
# self.edit = QTextEdit()
self.edit.setText(text)
# self.edit.setValidator(labelValidator()) # 验证有效性
self.edit.editingFinished.connect(self.postProcess)
model = QStringListModel()
model.setStringList(listItem)
completer = QCompleter()
completer.setModel(model)
self.edit.setCompleter(completer)
layout = QVBoxLayout()
layout.addWidget(self.edit)
self.buttonBox = bb = BB(BB.Ok | BB.Cancel, Qt.Horizontal, self)
bb.button(BB.Ok).setIcon(newIcon('done'))
bb.button(BB.Cancel).setIcon(newIcon('undo'))
bb.accepted.connect(self.validate)
bb.rejected.connect(self.reject)
layout.addWidget(bb)
# if listItem is not None and len(listItem) > 0:
# self.listWidget = QListWidget(self)
# for item in listItem:
# self.listWidget.addItem(item)
# self.listWidget.itemClicked.connect(self.listItemClick)
# self.listWidget.itemDoubleClicked.connect(self.listItemDoubleClick)
# layout.addWidget(self.listWidget)
self.setLayout(layout)
def validate(self):
try:
if self.edit.text().trimmed():
self.accept()
except AttributeError:
# PyQt5: AttributeError: 'str' object has no attribute 'trimmed'
if self.edit.text().strip():
self.accept()
def postProcess(self):
try:
self.edit.setText(self.edit.text().trimmed())
# print(self.edit.text())
except AttributeError:
# PyQt5: AttributeError: 'str' object has no attribute 'trimmed'
self.edit.setText(self.edit.text())
print(self.edit.text())
def popUp(self, text='', move=True):
self.edit.setText(text)
self.edit.setSelection(0, len(text))
self.edit.setFocus(Qt.PopupFocusReason)
if move:
cursor_pos = QCursor.pos()
parent_bottomRight = self.parentWidget().geometry()
max_x = parent_bottomRight.x() + parent_bottomRight.width() - self.sizeHint().width()
max_y = parent_bottomRight.y() + parent_bottomRight.height() - self.sizeHint().height()
max_global = self.parentWidget().mapToGlobal(QPoint(max_x, max_y))
if cursor_pos.x() > max_global.x():
cursor_pos.setX(max_global.x())
if cursor_pos.y() > max_global.y():
cursor_pos.setY(max_global.y())
self.move(cursor_pos)
return self.edit.text() if self.exec_() else None
def listItemClick(self, tQListWidgetItem):
try:
text = tQListWidgetItem.text().trimmed()
except AttributeError:
# PyQt5: AttributeError: 'str' object has no attribute 'trimmed'
text = tQListWidgetItem.text().strip()
self.edit.setText(text)
def listItemDoubleClick(self, tQListWidgetItem):
self.listItemClick(tQListWidgetItem)
self.validate()

File diff suppressed because it is too large Load Diff

@ -0,0 +1,60 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import pickle
import os
import sys
class Settings(object):
def __init__(self):
# Be default, the home will be in the same folder as labelImg
home = os.path.expanduser("~")
self.data = {}
# self.path = os.path.join(home, '.labelImgSettings.pkl')
self.path = os.path.join(home, '.autoOCRSettings.pkl')
def __setitem__(self, key, value):
self.data[key] = value
def __getitem__(self, key):
return self.data[key]
def get(self, key, default=None):
if key in self.data:
return self.data[key]
return default
def save(self):
if self.path:
with open(self.path, 'wb') as f:
pickle.dump(self.data, f, pickle.HIGHEST_PROTOCOL)
return True
return False
def load(self):
try:
if os.path.exists(self.path):
with open(self.path, 'rb') as f:
self.data = pickle.load(f)
return True
except:
print('Loading setting failed')
return False
def reset(self):
if os.path.exists(self.path):
os.remove(self.path)
print('Remove setting pkl file ${0}'.format(self.path))
self.data = {}
self.path = None

@ -0,0 +1,217 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/python
# -*- coding: utf-8 -*-
try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
except ImportError:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from libs.utils import distance
import sys
DEFAULT_LINE_COLOR = QColor(0, 255, 0, 128)
DEFAULT_FILL_COLOR = QColor(255, 0, 0, 128)
DEFAULT_SELECT_LINE_COLOR = QColor(255, 255, 255)
DEFAULT_SELECT_FILL_COLOR = QColor(0, 128, 255, 155)
DEFAULT_VERTEX_FILL_COLOR = QColor(0, 255, 0, 255)
DEFAULT_HVERTEX_FILL_COLOR = QColor(255, 0, 0)
MIN_Y_LABEL = 10
class Shape(object):
P_SQUARE, P_ROUND = range(2)
MOVE_VERTEX, NEAR_VERTEX = range(2)
# The following class variables influence the drawing
# of _all_ shape objects.
line_color = DEFAULT_LINE_COLOR
fill_color = DEFAULT_FILL_COLOR
select_line_color = DEFAULT_SELECT_LINE_COLOR
select_fill_color = DEFAULT_SELECT_FILL_COLOR
vertex_fill_color = DEFAULT_VERTEX_FILL_COLOR
hvertex_fill_color = DEFAULT_HVERTEX_FILL_COLOR
point_type = P_ROUND
point_size = 8
scale = 1.0
def __init__(self, label=None, line_color=None, difficult=False, paintLabel=False):
self.label = label
self.points = []
self.fill = False
self.selected = False
self.difficult = difficult
self.paintLabel = paintLabel
self._highlightIndex = None
self._highlightMode = self.NEAR_VERTEX
self._highlightSettings = {
self.NEAR_VERTEX: (4, self.P_ROUND),
self.MOVE_VERTEX: (1.5, self.P_SQUARE),
}
self._closed = False
if line_color is not None:
# Override the class line_color attribute
# with an object attribute. Currently this
# is used for drawing the pending line a different color.
self.line_color = line_color
def close(self):
self._closed = True
def reachMaxPoints(self):
if len(self.points) >= 4:
return True
return False
def addPoint(self, point):
if not self.reachMaxPoints():
self.points.append(point)
def popPoint(self):
if self.points:
return self.points.pop()
return None
def isClosed(self):
return self._closed
def setOpen(self):
self._closed = False
def paint(self, painter):
if self.points:
color = self.select_line_color if self.selected else self.line_color
pen = QPen(color)
# Try using integer sizes for smoother drawing(?)
pen.setWidth(max(1, int(round(2.0 / self.scale))))
painter.setPen(pen)
line_path = QPainterPath()
vrtx_path = QPainterPath()
line_path.moveTo(self.points[0])
# Uncommenting the following line will draw 2 paths
# for the 1st vertex, and make it non-filled, which
# may be desirable.
#self.drawVertex(vrtx_path, 0)
for i, p in enumerate(self.points):
line_path.lineTo(p)
self.drawVertex(vrtx_path, i)
if self.isClosed():
line_path.lineTo(self.points[0])
painter.drawPath(line_path)
painter.drawPath(vrtx_path)
painter.fillPath(vrtx_path, self.vertex_fill_color)
# Draw text at the top-left
if self.paintLabel:
min_x = sys.maxsize
min_y = sys.maxsize
for point in self.points:
min_x = min(min_x, point.x())
min_y = min(min_y, point.y())
if min_x != sys.maxsize and min_y != sys.maxsize:
font = QFont()
font.setPointSize(8)
font.setBold(True)
painter.setFont(font)
if(self.label == None):
self.label = ""
if(min_y < MIN_Y_LABEL):
min_y += MIN_Y_LABEL
painter.drawText(min_x, min_y, self.label)
if self.fill:
color = self.select_fill_color if self.selected else self.fill_color
painter.fillPath(line_path, color)
def drawVertex(self, path, i):
d = self.point_size / self.scale
shape = self.point_type
point = self.points[i]
if i == self._highlightIndex:
size, shape = self._highlightSettings[self._highlightMode]
d *= size
if self._highlightIndex is not None:
self.vertex_fill_color = self.hvertex_fill_color
else:
self.vertex_fill_color = Shape.vertex_fill_color
if shape == self.P_SQUARE:
path.addRect(point.x() - d / 2, point.y() - d / 2, d, d)
elif shape == self.P_ROUND:
path.addEllipse(point, d / 2.0, d / 2.0)
else:
assert False, "unsupported vertex shape"
def nearestVertex(self, point, epsilon):
for i, p in enumerate(self.points):
if distance(p - point) <= epsilon:
return i
return None
def containsPoint(self, point):
return self.makePath().contains(point)
def makePath(self):
path = QPainterPath(self.points[0])
for p in self.points[1:]:
path.lineTo(p)
return path
def boundingRect(self):
return self.makePath().boundingRect()
def moveBy(self, offset):
self.points = [p + offset for p in self.points]
def moveVertexBy(self, i, offset):
self.points[i] = self.points[i] + offset
def highlightVertex(self, i, action):
self._highlightIndex = i
self._highlightMode = action
def highlightClear(self):
self._highlightIndex = None
def copy(self):
shape = Shape("%s" % self.label)
shape.points = [p for p in self.points]
shape.fill = self.fill
shape.selected = self.selected
shape._closed = self._closed
if self.line_color != Shape.line_color:
shape.line_color = self.line_color
if self.fill_color != Shape.fill_color:
shape.fill_color = self.fill_color
shape.difficult = self.difficult
return shape
def __len__(self):
return len(self.points)
def __getitem__(self, key):
return self.points[key]
def __setitem__(self, key, value):
self.points[key] = value

@ -0,0 +1,86 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import os
import sys
import locale
from libs.ustr import ustr
try:
from PyQt5.QtCore import *
except ImportError:
if sys.version_info.major >= 3:
import sip
sip.setapi('QVariant', 2)
from PyQt4.QtCore import *
class StringBundle:
__create_key = object()
def __init__(self, create_key, localeStr):
assert(create_key == StringBundle.__create_key), "StringBundle must be created using StringBundle.getBundle"
self.idToMessage = {}
paths = self.__createLookupFallbackList(localeStr)
for path in paths:
self.__loadBundle(path)
@classmethod
def getBundle(cls, localeStr=None):
if localeStr is None:
try:
localeStr = locale.getlocale()[0] if locale.getlocale() and len(
locale.getlocale()) > 0 else os.getenv('LANG')
except:
print('Invalid locale')
localeStr = 'en'
return StringBundle(cls.__create_key, localeStr)
def getString(self, stringId):
assert(stringId in self.idToMessage), "Missing string id : " + stringId
return self.idToMessage[stringId]
def __createLookupFallbackList(self, localeStr):
resultPaths = []
basePath = ":/strings"
resultPaths.append(basePath)
if localeStr is not None:
# Don't follow standard BCP47. Simple fallback
tags = re.split('[^a-zA-Z]', localeStr)
for tag in tags:
lastPath = resultPaths[-1]
resultPaths.append(lastPath + '-' + tag)
return resultPaths
def __loadBundle(self, path):
PROP_SEPERATOR = '='
f = QFile(path)
if f.exists():
if f.open(QIODevice.ReadOnly | QFile.Text):
text = QTextStream(f)
text.setCodec("UTF-8")
while not text.atEnd():
line = ustr(text.readLine())
key_value = line.split(PROP_SEPERATOR)
key = key_value[0].strip()
value = PROP_SEPERATOR.join(key_value[1:]).strip().strip('"')
self.idToMessage[key] = value
f.close()

@ -0,0 +1,51 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
except ImportError:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
class ToolBar(QToolBar):
def __init__(self, title):
super(ToolBar, self).__init__(title)
layout = self.layout()
m = (0, 0, 0, 0)
layout.setSpacing(0)
layout.setContentsMargins(*m)
self.setContentsMargins(*m)
self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint)
def addAction(self, action):
if isinstance(action, QWidgetAction):
return super(ToolBar, self).addAction(action)
btn = ToolButton()
btn.setDefaultAction(action)
btn.setToolButtonStyle(self.toolButtonStyle())
self.addWidget(btn)
class ToolButton(QToolButton):
"""ToolBar companion class which ensures all buttons have the same size."""
minSize = (60, 60)
def minimumSizeHint(self):
ms = super(ToolButton, self).minimumSizeHint()
w1, h1 = ms.width(), ms.height()
w2, h2 = self.minSize
ToolButton.minSize = max(w1, w2), max(h1, h2)
return QSize(*ToolButton.minSize)

@ -0,0 +1,29 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import sys
from libs.constants import DEFAULT_ENCODING
def ustr(x):
'''py2/py3 unicode helper'''
if sys.version_info < (3, 0, 0):
from PyQt4.QtCore import QString
if type(x) == str:
return x.decode(DEFAULT_ENCODING)
if type(x) == QString:
#https://blog.csdn.net/friendan/article/details/51088476
#https://blog.csdn.net/xxm524/article/details/74937308
return unicode(x.toUtf8(), DEFAULT_ENCODING, 'ignore')
return x
else:
return x

@ -0,0 +1,182 @@
# Copyright (c) <2015-Present> Tzutalin
# Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba,
# William T. Freeman. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
from math import sqrt
from libs.ustr import ustr
import hashlib
import re
import sys
import cv2
import numpy as np
try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
except ImportError:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
def newIcon(icon, iconSize=None):
if iconSize is not None:
return QIcon(QIcon(':/' + icon).pixmap(iconSize,iconSize))
else:
return QIcon(':/' + icon)
def newButton(text, icon=None, slot=None):
b = QPushButton(text)
if icon is not None:
b.setIcon(newIcon(icon))
if slot is not None:
b.clicked.connect(slot)
return b
def newAction(parent, text, slot=None, shortcut=None, icon=None,
tip=None, checkable=False, enabled=True, iconSize=None):
"""Create a new action and assign callbacks, shortcuts, etc."""
a = QAction(text, parent)
if icon is not None:
if iconSize is not None:
a.setIcon(newIcon(icon, iconSize))
else:
a.setIcon(newIcon(icon))
if shortcut is not None:
if isinstance(shortcut, (list, tuple)):
a.setShortcuts(shortcut)
else:
a.setShortcut(shortcut)
if tip is not None:
a.setToolTip(tip)
a.setStatusTip(tip)
if slot is not None:
a.triggered.connect(slot)
if checkable:
a.setCheckable(True)
a.setEnabled(enabled)
return a
def addActions(widget, actions):
for action in actions:
if action is None:
widget.addSeparator()
elif isinstance(action, QMenu):
widget.addMenu(action)
else:
widget.addAction(action)
def labelValidator():
return QRegExpValidator(QRegExp(r'^[^ \t].+'), None)
class struct(object):
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
def distance(p):
return sqrt(p.x() * p.x() + p.y() * p.y())
def fmtShortcut(text):
mod, key = text.split('+', 1)
return '<b>%s</b>+<b>%s</b>' % (mod, key)
def generateColorByText(text):
s = ustr(text)
hashCode = int(hashlib.sha256(s.encode('utf-8')).hexdigest(), 16)
r = int((hashCode / 255) % 255)
g = int((hashCode / 65025) % 255)
b = int((hashCode / 16581375) % 255)
return QColor(r, g, b, 100)
def have_qstring():
'''p3/qt5 get rid of QString wrapper as py3 has native unicode str type'''
return not (sys.version_info.major >= 3 or QT_VERSION_STR.startswith('5.'))
def util_qt_strlistclass():
return QStringList if have_qstring() else list
def natural_sort(list, key=lambda s:s):
"""
Sort the list into natural alphanumeric order.
"""
def get_alphanum_key_func(key):
convert = lambda text: int(text) if text.isdigit() else text
return lambda s: [convert(c) for c in re.split('([0-9]+)', key(s))]
sort_key = get_alphanum_key_func(key)
list.sort(key=sort_key)
def get_rotate_crop_image(img, points):
try:
img_crop_width = int(
max(
np.linalg.norm(points[0] - points[1]),
np.linalg.norm(points[2] - points[3])))
img_crop_height = int(
max(
np.linalg.norm(points[0] - points[3]),
np.linalg.norm(points[1] - points[2])))
pts_std = np.float32([[0, 0], [img_crop_width, 0],
[img_crop_width, img_crop_height],
[0, img_crop_height]])
M = cv2.getPerspectiveTransform(points, pts_std)
dst_img = cv2.warpPerspective(
img,
M, (img_crop_width, img_crop_height),
borderMode=cv2.BORDER_REPLICATE,
flags=cv2.INTER_CUBIC)
dst_img_height, dst_img_width = dst_img.shape[0:2]
if dst_img_height * 1.0 / dst_img_width >= 1.5:
dst_img = np.rot90(dst_img)
return dst_img
except Exception as e:
print(e)
def stepsInfo(lang='en'):
if lang == 'ch':
msg = "1. 安装与运行:使用上述命令安装与运行程序。\n" \
"2. 打开文件夹:在菜单栏点击 “文件” - 打开目录 选择待标记图片的文件夹.\n"\
"3. 自动标注:点击 ”自动标注“使用PPOCR超轻量模型对图片文件名前图片状态为 “X” 的图片进行自动标注。\n" \
"4. 手动标注:点击 “矩形标注”(推荐直接在英文模式下点击键盘中的 “W”),用户可对当前图片中模型未检出的部分进行手动" \
"绘制标记框。点击键盘P则使用四点标注模式或点击“编辑” - “四点标注”用户依次点击4个点后双击左键表示标注完成。\n" \
"5. 标记框绘制完成后,用户点击 “确认”,检测框会先被预分配一个 “待识别” 标签。\n" \
"6. 重新识别:将图片中的所有检测画绘制/调整完成后,点击 “重新识别”PPOCR模型会对当前图片中的**所有检测框**重新识别。\n" \
"7. 内容更改:双击识别结果,对不准确的识别结果进行手动更改。\n" \
"8. 保存:点击 “保存”,图片状态切换为 “√”,跳转至下一张。\n" \
"9. 删除:点击 “删除图像”,图片将会被删除至回收站。\n" \
"10. 标注结果:关闭应用程序或切换文件路径后,手动保存过的标签将会被存放在所打开图片文件夹下的" \
"*Label.txt*中。在菜单栏点击 “PaddleOCR” - 保存识别结果后,会将此类图片的识别训练数据保存在*crop_img*文件夹下," \
"识别标签保存在*rec_gt.txt*中。\n"
else:
msg = "1. Build and launch using the instructions above.\n" \
"2. Click 'Open Dir' in Menu/File to select the folder of the picture.\n"\
"3. Click 'Auto recognition', use PPOCR model to automatically annotate images which marked with 'X' before the file name."\
"4. Create Box:\n"\
"4.1 Click 'Create RectBox' or press 'W' in English keyboard mode to draw a new rectangle detection box. Click and release left mouse to select a region to annotate the text area.\n"\
"4.2 Press 'P' to enter four-point labeling mode which enables you to create any four-point shape by clicking four points with the left mouse button in succession and DOUBLE CLICK the left mouse as the signal of labeling completion.\n"\
"5. After the marking frame is drawn, the user clicks 'OK', and the detection frame will be pre-assigned a TEMPORARY label.\n"\
"6. Click re-Recognition, model will rewrite ALL recognition results in ALL detection box.\n"\
"7. Double click the result in 'recognition result' list to manually change inaccurate recognition results.\n"\
"8. Click 'Save', the image status will switch to '',then the program automatically jump to the next.\n"\
"9. Click 'Delete Image' and the image will be deleted to the recycle bin.\n"\
"10. Labeling result: After closing the application or switching the file path, the manually saved label will be stored in *Label.txt* under the opened picture folder.\n"\
" Click PaddleOCR-Save Recognition Results in the menu bar, the recognition training data of such pictures will be saved in the *crop_img* folder, and the recognition label will be saved in *rec_gt.txt*.\n"
return msg

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save