File size: 1,809 Bytes
1fec2a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8e68008
1fec2a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
license: apache-2.0
datasets:
- imagenet-1k
metrics:
- accuracy
tags:
- RyzenAI
- vision
- classification
- pytorch
---

# Inception_v4
Quantized Inception_v4 model that could be supported by [AMD Ryzen AI](https://ryzenai.docs.amd.com/en/latest/).


## Model description
Inception_v4 was first introduced in the paper [Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning](https://arxiv.org/abs/1602.07261). 

The model implementaion is from [TensorFlow-Slim](https://github.com/tensorflow/models/tree/master/research/slim).


## How to use

### Installation

Follow [Ryzen AI Installation](https://ryzenai.docs.amd.com/en/latest/inst.html) to prepare the environment for Ryzen AI.
Run the following script to install pre-requisites for this model.

```bash
pip install -r requirements.txt
```

### Data Preparation

Follow [imagenet-1k](https://huggingface.co/datasets/imagenet-1k) to download dataset. 

Download [ImageNet validation synset labels file](https://github.com/tensorflow/models/blob/master/research/slim/datasets/imagenet_2012_validation_synset_labels.txt).

Create validation image list:
```bash
python create_image_list.py imagenet_2012_validation_synset_labels.txt
```

### Model Evaluation

```python
python eval_onnx.py --onnx_model inceptionv4_int8.onnx --ipu --provider_config Path\To\vaip_config.json --val_data_dir /Path/To/Your/Validation/Data --val_image_list val.txt
```

### Performance

|Metric |Accuracy on IPU|
| :----:  | :----: |
|Top1/Top5| 79.92% / 95.02%|


```bibtex
@article{Szegedy2016Inceptionv4IA,
  title={Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning},
  author={Christian Szegedy and Sergey Ioffe and Vincent Vanhoucke and Alexander A. Alemi},
  journal={arXiv:1602.07261},
  year={2016},
}

```