Wanli
commited on
Commit
·
8b5437e
1
Parent(s):
b81d9fd
update benchmark (#97)
Browse files- benchmark/README.md +10 -2
- benchmark/benchmark.py +1 -1
- tools/quantize/requirements.txt +1 -0
benchmark/README.md
CHANGED
@@ -20,12 +20,20 @@ Time is measured from data preprocess (resize is excluded), to a forward pass of
|
|
20 |
Run the following command to benchmark on a given config:
|
21 |
|
22 |
```shell
|
23 |
-
PYTHONPATH
|
|
|
24 |
```
|
25 |
|
26 |
If you are a Windows user and wants to run in CMD/PowerShell, use this command instead:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
```shell
|
28 |
-
|
29 |
python benchmark.py --cfg ./config/face_detection_yunet.yaml
|
30 |
```
|
31 |
<!--
|
|
|
20 |
Run the following command to benchmark on a given config:
|
21 |
|
22 |
```shell
|
23 |
+
export PYTHONPATH=$PYTHONPATH:..
|
24 |
+
python benchmark.py --cfg ./config/face_detection_yunet.yaml
|
25 |
```
|
26 |
|
27 |
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
|
35 |
```shell
|
36 |
+
$env:PYTHONPATH=$env:PYTHONPATH+";.."
|
37 |
python benchmark.py --cfg ./config/face_detection_yunet.yaml
|
38 |
```
|
39 |
<!--
|
benchmark/benchmark.py
CHANGED
@@ -30,7 +30,7 @@ def prepend_pythonpath(cfg):
|
|
30 |
prepend_pythonpath(v)
|
31 |
else:
|
32 |
if 'path' in k.lower():
|
33 |
-
cfg[k] = os.path.join(os.environ['PYTHONPATH'], v)
|
34 |
|
35 |
class Benchmark:
|
36 |
def __init__(self, **kwargs):
|
|
|
30 |
prepend_pythonpath(v)
|
31 |
else:
|
32 |
if 'path' in k.lower():
|
33 |
+
cfg[k] = os.path.join(os.environ['PYTHONPATH'].split(os.pathsep)[-1], v)
|
34 |
|
35 |
class Benchmark:
|
36 |
def __init__(self, **kwargs):
|
tools/quantize/requirements.txt
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
opencv-python>=4.5.4.58
|
2 |
onnx
|
3 |
onnxruntime
|
|
|
4 |
neural-compressor
|
|
|
1 |
opencv-python>=4.5.4.58
|
2 |
onnx
|
3 |
onnxruntime
|
4 |
+
onnxruntime-extensions
|
5 |
neural-compressor
|