Skip to content

Commit a598abf

Browse files
committed
update READMET
1 parent 106c413 commit a598abf

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

README.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,69 +6,70 @@ Cite:
66
`M. Wess, M. Ivanov, C. Unger, A. Nookala, A. Wendt and A. Jantsch, "ANNETTE: Accurate Neural Network Execution Time Estimation With Stacked Models," in IEEE Access, vol. 9, pp. 3545-3556, 2021, doi: 10.1109/ACCESS.2020.3047259.`
77

88
# Install
9-
* I recommended install in a virtualenv
10-
* Tested with python 3.6-3.7
9+
* Tested with python >=3.6
1110

1211
recommended install:
13-
`git clone https://code.siemens.com/eld_at/annette.git`
14-
`pip install -r requirements.txt`
15-
`pip install -e .`
12+
- `git clone https://github.com/embedded-machine-learning/annette.git`
13+
- `cd annette`
14+
- `pip install -r requirements.txt`
15+
- `pip install -e .`
1616

1717

1818
# Usage
1919
* mmtoir to export to MMDNN format (here you might need to install tensorflow or pytorch)
2020
* ANNETTE only needs the .pb-file, you can savely remove the .npy-weightfile
2121

2222
## MMDNN to ANNETTE
23-
* use `python3 src/annette/m2a.py [network-file/network-name]` to convert from mmdnn to annette format. Output is stored in `database/graphs/annette/[network].json`
23+
* use `annette_m2a [network-file/network-name]` to convert from mmdnn to annette format. Output is stored in `database/graphs/annette/[network].json`
2424
* Either copy the file to `database/graphs/mmdnn/[network].pb` and use only the `network-name` oder give the full Path
2525

2626
## Estimation
27-
`python3 src/annette/estimate.py [network-name] [mapping-model] [layer-model]`
27+
`annette_estimate [network-name] [mapping-model] [layer-model]`
2828

2929
## Examples
3030

31-
* Some example graphs are already stored in `database\graphs\annette`
31+
* Some example graphs are already stored in `database/graphs/annette`
3232
* Some model optimizer examples `ov` and `dnndk`
3333
* Some layer model exmaples `ncs2-roofline` and `dnndk-roofline`
34+
* For conversion and download MMDNN requires some of the frameworks such as pytorch, tensorflow
35+
36+
### Simple examples (networks in `database/graphs/annette`)
3437

35-
### Pytorch Densenet121
3638
```
37-
python3 src/annette/m2a.py densenet121
38-
python3 src/annette/estimate.py densenet121 ov ncs2-roofline
39+
annette_m2a cf_resnet50
40+
annette_estimate cf_resnet50 ov ncs2-roofline
3941
```
4042

41-
4243
### Pytorch Mnasnet0.5
4344
```
4445
mmdownload -f pytorch -n mnasnet0_5 -o database/graphs/pytorch/
4546
mmtoir -f pytorch -d database/graphs/mmdnn/mnasnet0_5 --inputShape 3,224,224 -n database/graphs/pytorch/imagenet_mnasnet0_5.pth
46-
python3 src/annette/m2a.py mnasnet0_5
47-
python3 src/annette/estimate.py mnasnet0_5 ov ncs2-roofline
47+
annette_m2a mnasnet0_5
48+
annette_estimate mnasnet0_5 ov ncs2-roofline
4849
```
4950

5051
### Pytorch Densenet121
5152
```
5253
mmdownload -f pytorch -n densenet121 -o database/graphs/pytorch/
5354
mmtoir -f pytorch -d database/graphs/mmdnn/densenet121 --inputShape 3,224,224 -n database/graphs/pytorch/imagenet_densenet121.pth
54-
python3 src/annette/m2a.py densenet121
55-
python3 src/annette/estimate.py densenet121 ov ncs2-roofline
55+
annette_m2a densenet121
56+
annette_estimate densenet121 ov ncs2-roofline
5657
```
5758

5859
### Pytorch Squeezenet1.0
5960
```
6061
mmdownload -f pytorch -n squeezenet1_0 -o database/graphs/pytorch/
6162
mmtoir -f pytorch -d database/graphs/mmdnn/squeezenet1_0 --inputShape 3,224,224 -n database/graphs/pytorch/imagenet_squeezenet1_0.pth
62-
python3 src/annette/m2a.py squeezenet1_0
63-
python3 src/annette/estimate.py squeezenet1_0 ov ncs2-roofline
63+
annette_m2a squeezenet1_0
64+
annette_estimate squeezenet1_0 ov ncs2-roofline
6465
```
6566

6667

6768
### DeeplabV3 (https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/model_zoo.md)
6869
```
6970
mmtoir -f tensorflow -w database/graphs/tf/deeplabv3_mnv2_dm05_pascal.pb --inNodeName MobilenetV2/MobilenetV2/input --inputShape 513,513,3 --dstNodeName ArgMax -o database/graphs/mmdnn/deeplabv3
70-
python3 src/annette/m2a.py deeplabv3
71-
python3 src/annette/estimate.py deeplabv3 ov ncs2-roofline
71+
annette_m2a deeplabv3
72+
annette_estimate deeplabv3 ov ncs2-roofline
7273
7374
7475
mmtoir -f tensorflow -d database/graphs/mmdnn/tf_deeplabv3_original --inputShape 1025,2049,3 database/graphs/tf/deeplabv3_original.pb
@@ -79,22 +80,22 @@ mmtoir -f tensorflow -d database/graphs/mmdnn/tf_deeplabv3_original --inputShape
7980
```
8081
mmdownload -f tensorflow -n mobilenet_v1_1.0_frozen -o database/graphs/tf/
8182
mmtoir -f tensorflow -w database/graphs/tf/mobilenet_v1_1.0_224/frozen_graph.pb --inNodeName input --inputShape 224,224,3 --dstNodeName MobilenetV1/Predictions/Softmax -o database/graphs/mmdnn/mobilenet_v1
82-
python3 src/annette/m2a.py mobilenet_v1
83-
python3 src/annette/estimate.py mobilenet_v1 ov ncs2-roofline
83+
annette_m2a mobilenet_v1
84+
annette_estimate mobilenet_v1 ov ncs2-roofline
8485
```
8586

8687
### TinyYolov4
8788
```
8889
mmtoir -f tensorflow -w database/graphs/tf/darknet_yolov4_tiny_512_512_coco.pb --inNodeName inputs --inputShape 512,512,3 --dstNodeName detector/yolo-v4-tiny/Conv_17/BiasAdd detector/yolo-v4-tiny/Conv_20/BiasAdd -o database/graphs/mmdnn/darknet_yolov4_tiny_512_512_coco
89-
python3 src/annette/m2a.py darknet_yolov4_tiny_512_512_coco
90-
python3 src/annette/estimate.py darknet_yolov4_tiny_512_512_coco ov ncs2-roofline
90+
annette_m2a darknet_yolov4_tiny_512_512_coco
91+
annette_estimate darknet_yolov4_tiny_512_512_coco ov ncs2-roofline
9192
```
9293

9394
### Yolov4
9495
```
9596
mmtoir -f tensorflow -w database/graphs/tf/darknet_yolov4_512_512_coco.pb --inNodeName inputs --inputShape 512,512,3 --dstNodeName detector/yolo-v4/Conv_1/BiasAdd detector/yolo-v4/Conv_9/BiasAdd detector/yolo-v4/Conv_17/BiasAdd -o database/graphs/mmdnn/darknet_yolov4_512_512_coco
96-
python3 src/annette/m2a.py darknet_yolov4_512_512_coco
97-
python3 src/annette/estimate.py darknet_yolov4_512_512_coco ov ncs2-roofline
97+
annette_m2a darknet_yolov4_512_512_coco
98+
annette_estimate darknet_yolov4_512_512_coco ov ncs2-roofline
9899
```
99100

100101

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[metadata]
66
name = annette
7-
description = Add a short description here!
7+
description = ANNETTE - Accurate Neural Network Execution Time Estimation
88
author = Matthias Wess
99
author-email = matthias.wess@gmail.com
1010
license = Apache-2.0
@@ -29,6 +29,7 @@ package_dir =
2929
=src
3030
# DON'T CHANGE THE FOLLOWING LINE! IT WILL BE UPDATED BY PYSCAFFOLD!
3131
setup_requires = pyscaffold>=3.2a0,<3.3a0
32+
python_requires = >=3.6
3233
# Add here dependencies of your project (semicolon/line-separated), e.g.
3334
# install_requires = numpy; scipy
3435
# The usage of test_requires is discouraged, see `Dependency Management` docs

0 commit comments

Comments
 (0)