860 Commits

Author SHA1 Message Date
zhang-prog
97d9728a1d
cpp_infer and python_infer support PP-OCRv5 models (#15410)
* cpp_infer support PP-OCRv5 models

* python_infer support PP-OCRv5 models

* update version2.x model_list

* rollback version2.x model_list

* update

* update
2025-05-27 12:01:53 +08:00
zhang-prog
9f01c8402d
update inference scripts (#15043)
* update inference scripts

* update load_config

* update

* extend to all inference scripts

* update error message

* fix

* to decouple the cpu_threads setting from mkldnn option and fix the deault action for mkldnn

* update --enable_mkldnn default value

* update enable_mkldnn option

* rerun CI
2025-05-20 15:59:59 +08:00
liuhongen1234567
fdb1165c3a
fix doc (#15160) 2025-05-19 03:02:35 +08:00
liuhongen1234567
0caa3e98de
add_ppformulanet_plus (#15129)
* add_ppformulanet_plus

* rename ppformulanet_l_plus2plus_l
2025-05-13 14:20:42 +08:00
EnflameGCU
9bd0177cff
[GCU] Update gcu config (#14851) 2025-03-17 19:31:37 +08:00
Jonathans575
6778da99e2
feat(train): use naive_sync_bn with xpu device. (#14849)
* feat(train): use naive_sync_bn with xpu device.

* feat(train): use naive_sync_bn with xpu device.
2025-03-13 19:45:02 +08:00
co63oc
78ec762aac
Fix typos (#14800) 2025-03-04 14:20:13 +08:00
co63oc
f35dfef921
Fix (#14795) 2025-03-04 09:38:37 +08:00
Wang Xin
1d52a2b2e1
fix OverflowError in text_visual func (#14758) 2025-02-26 15:38:16 +08:00
hong
b18b656633
remove max inplace grad (#14596)
* remove max inplace grad

* update
2025-01-26 17:19:42 +08:00
liuhongen1234567
b3e3588af9
repair train bug in multi gpu (#14576) 2025-01-22 11:04:01 +08:00
liuhongen1234567
cf4c0591ba
repair bug in latexocr cpu infer and typo (#14552) 2025-01-16 15:56:13 +08:00
liuhongen1234567
d523388ed1
Add pp formulanet (#14429)
* add ppformulanet

* rename loss

* modify doc

* add export code

* modify yaml for global ref
2024-12-23 13:14:33 +08:00
Liu Jiaxuan
ae67d96f3e
add slanext models (#14374)
* add slanext models

* refine codes

* refine codes

* refine codes
2024-12-13 13:39:19 +08:00
liuhongen1234567
78e7184022
add unimernet model (#14357)
* add unimernet model

* add commate and single test

* repair pytest

* delete export and infer

* delete [ file
2024-12-12 14:17:24 +08:00
EnflameGCU
c8874d717f
[GCU] Support inference for GCU (#14142) 2024-11-21 10:10:41 +08:00
Wang Xin
fbba2178d7
update infer/utility.py to support json format model (#14233)
* update infer/utility.py to support json format model

* merge from #13524

* fix bug

* fix bug

* Update tools/infer/utility.py

Co-authored-by: jzhang533 <jzhang533@gmail.com>

* fix codestyle

---------

Co-authored-by: jzhang533 <jzhang533@gmail.com>
2024-11-18 14:00:58 +08:00
zhangyubo0722
1d4e7a80a0
rename train result (#14217) 2024-11-13 15:49:52 +08:00
Alex
58e876d38d
[third-party] Fix the issue of inference errors with KE models in ONNX format (#14138)
* fix inference KIE model using onnx model

* fix code style

* fix onnx inputs compatiblility with det and rec

* fix code style
2024-11-02 00:14:34 +08:00
Salmondx
37e177595b
Allow create_predictor function to accept array of ONNX Execution Providers (#14078)
* pass onnx execution providers to create_predictor function

* added ability to provide onnxruntime SessionOptions

* added argument parser for onnx_sess_options

---------

Co-authored-by: ggolda <gleb.golda@streamlabs.com>
2024-10-25 20:21:39 +08:00
zhangyubo0722
cba775412a
ix gpu memory growth (#14037) 2024-10-18 17:06:58 +08:00
lona-cn
ea7ba39f52
Update program.py (#13989)
avoid ZeroDivisionError when training.
2024-10-14 07:47:26 +08:00
wangna11BD
596328d191
[NPU] cherrypick13983 (#13984)
* support sybn for npu

* fix code style

* fix code style
2024-10-12 18:46:33 +08:00
Wang Xin
cda3e1201e
fix hubserving run error (#13918)
* fix hubserving run error

* Update paddleocr.py
2024-09-27 15:58:49 +08:00
zhangyubo0722
2b51369324
support export after save model (#13844) 2024-09-25 01:11:01 +08:00
Wang Xin
3cc4ae9f37
set --image_dir to be required (#13896) 2024-09-23 14:17:44 +08:00
Wang Xin
1c8233d5bc
fix SRN algorithm infer error (#13851) 2024-09-11 19:16:30 +08:00
liuhongen1234567
30811fba3c
Repair the bug in the inference script for LaTeX OCR (#13750)
* test

* dataprocess_abspath2relpath

* repair bug in infer/predict_rec for latexocr
2024-08-26 14:21:41 +08:00
liuhongen1234567
5f0b90a110
Fix some issues with LaTeXOCR in paddleX (#13646)
* repair_some_Bug_for_paddlex

* style2

* style2

* add_epilson_for groupnorm
2024-08-14 11:30:25 +08:00
changdazhou
b6211b936b
support benchmark for paddlepaddle3.0 (#13574) 2024-08-02 19:24:40 +08:00
zhangyubo0722
6c12df47b2
merge release/2.6.1 to main (#13523) 2024-07-29 19:09:42 +08:00
liuhongen1234567
cf26f2330e
Latexocr paddle (#13401)
* commit_test

* modified:   configs/rec/rec_latex_ocr.yml
	deleted:    ppocr/modeling/backbones/rec_resnetv2.py

* ntuple_solve

* style

* style

* style

* style

* style

* style

* style

* style

* style

* delete comment

* cla_email
2024-07-22 11:50:23 +08:00
Manik Singh Sarmaal
5347be75f9
Update program.py (#13389)
refering to-https://www.paddlepaddle.org.cn/documentation/docs/en/api/paddle/incubate/ModelAverage_en.html

it should be paddle.incunate.ModelAverage and paddle.incubate.optimizer.ModelAverage
2024-07-15 21:48:26 +08:00
Wang Xin
db0ad17cf6
fix slice op parameters not being passed correctly (#13319) 2024-07-09 17:13:41 +08:00
Wang Xin
c95f6b2de7
optimize func: get_infer_gpuid (#13275)
* optimize func: get_infer_gpuid

* apply code review suggestion
2024-07-09 10:01:16 +08:00
CaiRan
6d5f998fe1
solve the onnxruntime inference issue (#13154) 2024-06-21 17:20:40 +08:00
enximi
86a447de9f
fix wrong function name (#12826)
AttributeError: module 'ntpath' has no attribute 'is_dir'. Did you mean: 'isdir'?
2024-06-09 10:23:24 +08:00
Alex Pasquali
a764c560ba
Save recognition inference logs to file (#12542)
* Save recognition inference logs to file

* Formatted code with black
2024-05-31 09:36:34 +08:00
Alex Pasquali
6e7a1b871d
Save detection inference logs to file (#12042)
* Save detection inference logs to file

* Minor fix on save_log_path

* Formatted with black

* If logger is None: get_logger()
2024-05-29 11:19:47 +08:00
Wang Xin
ea29b423d5
fix and enable flake8 E721 (#12258) 2024-05-27 11:12:05 +08:00
aspaul20
965f569e81
added sliding window for large image inference (#12152)
added sliding window for large image inference
2024-05-24 16:16:37 +08:00
Sanjay Rijal
502e1675e4
Error with pyclipper inhomogeneous expanded array (#12108)
* pyclipper inhomogeneous expanded array solved

For some images, `np.array(offset.Execute(distance))` can result in inhomogeneous part of the detection box list, which cannot be casted into numpy array directly.

* corrected box reshape position

- box reshape was mistakenly done at line 145 which is now correctly done at line 92 of `db_postprocess.py`
- if box is empty then continue

* reverted mistakenly changed line 147

- reverted mistakenly changed `box.array(box)` to `np.array(box)`

* expanded array fix for `det_box_type=quad`

* polygons padding

For `--det_box_type = poly`, pad the detected polygon arrays if they have different shapes to ensure even shapes of polygon arrays

* fix codestyle

---------

Co-authored-by: Wang Xin <xinwang614@gmail.com>
2024-05-18 09:19:06 +08:00
张春乔
a730065e7b
【OCR Issue No.9】以可选形式支持Visualdl (#11947)
* delete visual dl

* totally delete visual

* delete vdl file

* fix codestyle
2024-04-25 17:37:27 +08:00
Wang Xin
045e5f6ac7
add pre-commit workflow (#11973)
* add pre-commit workflow

* run 'pre-commit run --all-files'

* setup python version
2024-04-21 21:46:20 +08:00
co63oc
3b6f117c44
Fix (#11448) 2024-01-02 11:02:13 +08:00
marswen
0382bfb02d
Optimize prediction on long image and deduplicate similar boxes with multiple lables (#11366)
* Handle conflict where a box is simultaneously recognized as multiple labels

* Split large height image recursively and process each with overlap to enhance performance

* Fix error when dt_box result is empty

* Add split operation on horizon side

* Slide on horizon may suffer line completeness, so that add more strict condition.

* Optimize recognition of overlap boxes.
2023-12-21 10:32:42 +08:00
TracebaK
317eac13b5
Add device check in check_gpu (#11293) 2023-12-06 11:12:58 +08:00
gmm
856ce76be3
Dygraph fix max_mem_reserved for benchmark (#11341)
* fix profile

* fix python3.10

* add max_mem_reserved for benchmark

* fix benchmark
2023-12-05 14:55:38 +08:00
RuohengMa
317f56a3f4
Refine according to comment (#11301) 2023-11-24 16:50:34 +08:00
RuohengMa
c8544d04ec
Fix bug when running on XPU (#11299) 2023-11-23 16:58:48 +08:00