Image Classification
AIoT
QNN
File size: 1,302 Bytes
38b40d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
## Model Information

### Source model
- Input shape: [1x3x224x224], [1x77]
- Number of parameters: 43.02M, 105.16M
- Model size: 172.10M, 122.99M
- Output shape: [1x512], [1x512]

Source model repository: [clip-vit-base-patch16](https://huggingface.co/openai/clip-vit-base-patch16)

## Inference with AidLite SDK

### SDK installation
Model Farm uses AidLite SDK as the model inference SDK. For details, please refer to the https://docs.aidlux.com/software/ai-sdk/aidlite_guide(https://docs.aidlux.com/software/ai-sdk/aidlite_guide)

- Install AidLite SDK

```bash

# Install the appropriate version of the aidlite sdk

sudo aid-pkg update

sudo aid-pkg install aidlite-sdk

# Download the qnn version that matches the above backend. Eg Install QNN2.36 Aidlite: sudo aid-pkg install aidlite-qnn236

sudo aid-pkg install aidlite-{QNN VERSION}

```

- Verify AidLite SDK

```bash

# aidlite sdk c++ check

python3 -c "import aidlite ; print(aidlite.get_library_version())"



# aidlite sdk python check

python3 -c "import aidlite ; print(aidlite.get_py_library_version())"

```

### Run Demo
```bash

# Environment setup

pip install ftfy packaging regex tqdm Pillow numpy

# Run example

cd model_farm_clip-vit-16_qcs8550_qnn2.36_fp16_aidlite/python

python3 run_test.py

```