Skip to content

Commit ca473dd

Browse files
authored
update benchmark (opencv#97)
1 parent 109656f commit ca473dd

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

benchmark/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,20 @@ Time is measured from data preprocess (resize is excluded), to a forward pass of
2020
Run the following command to benchmark on a given config:
2121

2222
```shell
23-
PYTHONPATH=.. python benchmark.py --cfg ./config/face_detection_yunet.yaml
23+
export PYTHONPATH=$PYTHONPATH:..
24+
python benchmark.py --cfg ./config/face_detection_yunet.yaml
2425
```
2526

2627
If you are a Windows user and wants to run in CMD/PowerShell, use this command instead:
28+
- CMD
29+
```shell
30+
set PYTHONPATH=%PYTHONPATH%;..
31+
python benchmark.py --cfg ./config/face_detection_yunet.yaml
32+
```
33+
34+
- PowerShell
2735
```shell
28-
set PYTHONPATH=..
36+
$env:PYTHONPATH=$env:PYTHONPATH+";.."
2937
python benchmark.py --cfg ./config/face_detection_yunet.yaml
3038
```
3139
<!--

benchmark/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def prepend_pythonpath(cfg):
3030
prepend_pythonpath(v)
3131
else:
3232
if 'path' in k.lower():
33-
cfg[k] = os.path.join(os.environ['PYTHONPATH'], v)
33+
cfg[k] = os.path.join(os.environ['PYTHONPATH'].split(os.pathsep)[-1], v)
3434

3535
class Benchmark:
3636
def __init__(self, **kwargs):

tools/quantize/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
opencv-python>=4.5.4.58
22
onnx
33
onnxruntime
4+
onnxruntime-extensions
45
neural-compressor

0 commit comments

Comments
 (0)