Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #3

Merged
merged 53 commits into from
Jul 16, 2020
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b7d3913
first commit
likholat Apr 15, 2020
71a269c
wrong result
likholat Apr 22, 2020
d3eb91c
right result but wrong label
likholat Apr 23, 2020
d970854
right result but wrong label
likholat Apr 23, 2020
2e42350
right result but wrong label
likholat Apr 23, 2020
a4749ab
wrong label
likholat Apr 23, 2020
3f7002b
probability in range [0,1]
likholat Apr 23, 2020
893efdc
fix comments
likholat Apr 24, 2020
8cd6cf3
fix comments
likholat Apr 24, 2020
c50d30d
fix comment
likholat Apr 24, 2020
4616dbe
fix comment
likholat Apr 24, 2020
2bfa5ef
fix commets
likholat Apr 27, 2020
a6ce0b1
fix comments
likholat Apr 27, 2020
503b73c
first commit
likholat Apr 28, 2020
549ab64
classify added
likholat Apr 29, 2020
47fc54d
rename file
likholat Apr 29, 2020
e7f8fb5
classification constructor added
likholat Apr 30, 2020
ac74cce
to save changes
likholat Apr 30, 2020
4c42ec0
fix comments
likholat Apr 30, 2020
c6f4e93
fix comment
likholat Apr 30, 2020
46d2b01
fit comments
likholat Apr 30, 2020
86ed664
fixes
likholat Apr 30, 2020
b67f5cb
fix comments
likholat May 7, 2020
a9b0807
fix comments
likholat May 7, 2020
868e2c3
fix comments
likholat May 8, 2020
bf25e8b
fix comments
likholat May 8, 2020
44216c7
fix comments
likholat May 15, 2020
7fe4a96
fix coments
likholat May 20, 2020
bdc3784
fix coments
likholat May 21, 2020
e7830ae
fix comments
likholat May 22, 2020
97257e4
fix comments
likholat Jun 1, 2020
8b69285
Merge pull request #1 from likholat/tensorflow_test
likholat Jun 1, 2020
1f5e845
fixes
likholat Jun 22, 2020
63e2d30
fixes
likholat Jun 22, 2020
287ab61
fixes
likholat Jun 22, 2020
62bdc48
fixes
likholat Jun 22, 2020
0879df1
first commit
likholat May 20, 2020
46f3d0b
fixed comments
likholat Jun 23, 2020
f517ae6
quantisation added
likholat Jun 24, 2020
ef9440d
fixed metric
likholat Jun 24, 2020
6abc8e7
fixed comments
likholat Jun 24, 2020
be62f6a
fixed comments
likholat Jun 24, 2020
7896659
fixed comments
likholat Jun 24, 2020
06e1931
estimated accuracy added
likholat Jun 25, 2020
6f8284b
fixed comments
likholat Jun 25, 2020
e282f47
fixes
likholat Jun 25, 2020
a189342
fixes
likholat Jun 25, 2020
1a4c4f0
fixes
likholat Jun 25, 2020
07ba1c6
fixes
likholat Jun 25, 2020
b40879b
fixes
likholat Jun 25, 2020
779b5b5
fixes
likholat Jun 25, 2020
6c59cd3
fixes
likholat Jun 25, 2020
b5ceb2b
Merge pull request #2 from likholat/openvino_test
likholat Jul 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes
  • Loading branch information
likholat committed Jun 25, 2020
commit e282f47a6ebedf462f52ac35cf3800e526d23cf5
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,70 @@

Link to find ResNet_V2_101 model:
https://www.tensorflow.org/lite/guide/hosted_models

Direct link to download this model:
https://storage.googleapis.com/download.tensorflow.org/models/tflite_11_05_08/resnet_v2_101.tgz

To validate TensorFlow model on one image run:

```bash
python3 demo_classification.py --engine tf --graph resnet_v2_101_299_frozen.pb --image example.jpeg
```

To validate TensorFlow model on ImageNet dataset run:

```bash
python3 evaluate.py --engine tf --graph resnet_v2_101_299_frozen.pb --dataset ILSVRC2012_img_val
```

# OpenVINO sample

To initialise OpenVINO environment variables use:

``bash
source /opt/intel/openvino/bin/setupvars.sh
``

Run the ```convert.py``` script before converting the model, it creates resnet_v2_101_299_opt.pb file in current directory:
Run the ```convert.py``` script before converting the model, it creates ```resnet_v2_101_299_opt.pb``` file in current directory:

``bash
python3 convert.py --graph resnet_v2_101_299_frozen.pb
``

To convert TensorFlow model to Intermediate Representation:

``bash
cd folder/for/IR/model
python3 ~/openvino/model-optimizer/mo_tf.py --input_shape "[1,299,299,3]" --input_model resnet_v2_101_299_opt.pb
``

To validate OpenVINO model on one image run:

``bash
python3 demo_classification.py --engine opvn --xml resnet_v2_101_299_opt.xml --image example.jpeg
``

To validate OpenVINO model on ImageNet dataset run:

``bash
python3 evaluate.py --engine opvn --xml resnet_v2_101_299_opt.xml --dataset ILSVRC2012_img_val
``

To quantizes the model to int8 model run:

``bash
python3 calibration.py --xml resnet_v2_101_299_opt.xml --data ILSVRC2012_img_val --annotation ILSVRC2012_img_val/val.txt
``
This script created ```/model/optimised``` folder in current folder with quantized model.

To validate int8 model on one image run:

``bash
python3 demo_classification.py --engine opvn --xml /model/optimized/resnet_v2_101_299_opt.xml --image example.jpeg
``

To validate int8 model on ImageNet dataset run:

``bash
python3 evaluate.py --engine opvn --xml /model/optimized/resnet_v2_101_299_opt.xml --dataset ILSVRC2012_img_val
``
Expand Down