qaihm-bot commited on
Commit
c29f247
·
verified ·
1 Parent(s): e271b2c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +55 -117
README.md CHANGED
@@ -16,11 +16,9 @@ tags:
16
 
17
  YoloV7 is a machine learning model that predicts bounding boxes and classes of objects in an image. This model is post-training quantized to int8 using samples from the COCO dataset.
18
 
19
- This model is an implementation of Yolo-v7-Quantized found [here](https://github.com/WongKinYiu/yolov7/).
20
- This repository provides scripts to run Yolo-v7-Quantized on Qualcomm® devices.
21
- More details on model performance across various devices, can be found
22
- [here](https://aihub.qualcomm.com/models/yolov7_quantized).
23
-
24
 
25
  ### Model Details
26
 
@@ -31,129 +29,69 @@ More details on model performance across various devices, can be found
31
  - Number of parameters: 6.24M
32
  - Model size: 6.23 MB
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
 
36
 
37
- | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
38
- | ---|---|---|---|---|---|---|---|
39
- | Samsung Galaxy S23 Ultra (Android 13) | Snapdragon® 8 Gen 2 | TFLite | 4.43 ms | 0 - 143 MB | INT8 | NPU | [Yolo-v7-Quantized.tflite](https://huggingface.co/qualcomm/Yolo-v7-Quantized/blob/main/Yolo-v7-Quantized.tflite)
40
- | Samsung Galaxy S23 Ultra (Android 13) | Snapdragon® 8 Gen 2 | QNN Model Library | 4.818 ms | 0 - 10 MB | INT8 | NPU | Yolo-v7-Quantized
41
-
42
-
43
-
44
- ## Installation
45
-
46
- This model can be installed as a Python package via pip.
47
-
48
- ```bash
49
- pip install "qai-hub-models[yolov7_quantized]"
50
- ```
51
-
52
-
53
-
54
- ## Configure Qualcomm® AI Hub to run this model on a cloud-hosted device
55
-
56
- Sign-in to [Qualcomm® AI Hub](https://app.aihub.qualcomm.com/) with your
57
- Qualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.
58
-
59
- With this API token, you can configure your client to run models on the cloud
60
- hosted devices.
61
- ```bash
62
- qai-hub configure --api_token API_TOKEN
63
- ```
64
- Navigate to [docs](https://app.aihub.qualcomm.com/docs/) for more information.
65
-
66
-
67
-
68
- ## Demo off target
69
-
70
- The package contains a simple end-to-end demo that downloads pre-trained
71
- weights and runs this model on a sample input.
72
-
73
- ```bash
74
- python -m qai_hub_models.models.yolov7_quantized.demo
75
- ```
76
-
77
- The above demo runs a reference implementation of pre-processing, model
78
- inference, and post processing.
79
-
80
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
81
- environment, please add the following to your cell (instead of the above).
82
- ```
83
- %run -m qai_hub_models.models.yolov7_quantized.demo
84
- ```
85
-
86
-
87
- ### Run model on a cloud-hosted device
88
-
89
- In addition to the demo, you can also run the model on a cloud-hosted Qualcomm®
90
- device. This script does the following:
91
- * Performance check on-device on a cloud-hosted device
92
- * Downloads compiled assets that can be deployed on-device for Android.
93
- * Accuracy check between PyTorch and on-device outputs.
94
-
95
- ```bash
96
- python -m qai_hub_models.models.yolov7_quantized.export
97
- ```
98
-
99
- ```
100
- Profile Job summary of Yolo-v7-Quantized
101
- --------------------------------------------------
102
- Device: Snapdragon X Elite CRD (11)
103
- Estimated Inference Time: 3.88 ms
104
- Estimated Peak Memory Range: 1.18-1.18 MB
105
- Compute Units: NPU (221) | Total (221)
106
-
107
-
108
- ```
109
-
110
-
111
-
112
-
113
- ## Run demo on a cloud-hosted device
114
-
115
- You can also run the demo on-device.
116
-
117
- ```bash
118
- python -m qai_hub_models.models.yolov7_quantized.demo --on-device
119
- ```
120
-
121
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
122
- environment, please add the following to your cell (instead of the above).
123
- ```
124
- %run -m qai_hub_models.models.yolov7_quantized.demo -- --on-device
125
- ```
126
-
127
-
128
- ## Deploying compiled model to Android
129
-
130
-
131
- The models can be deployed using multiple runtimes:
132
- - TensorFlow Lite (`.tflite` export): [This
133
- tutorial](https://www.tensorflow.org/lite/android/quickstart) provides a
134
- guide to deploy the .tflite model in an Android application.
135
-
136
-
137
- - QNN (`.so` export ): This [sample
138
- app](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)
139
- provides instructions on how to use the `.so` shared library in an Android application.
140
 
 
 
 
141
 
142
- ## View on Qualcomm® AI Hub
143
- Get more details on Yolo-v7-Quantized's performance across various devices [here](https://aihub.qualcomm.com/models/yolov7_quantized).
144
- Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)
145
 
146
- ## License
147
- - The license for the original implementation of Yolo-v7-Quantized can be found
148
- [here](https://github.com/WongKinYiu/yolov7/blob/main/LICENSE.md).
149
- - The license for the compiled assets for on-device deployment can be found [here](https://github.com/WongKinYiu/yolov7/blob/main/LICENSE.md)
150
 
151
  ## References
152
  * [YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors](https://arxiv.org/abs/2207.02696)
153
  * [Source Model Implementation](https://github.com/WongKinYiu/yolov7/)
154
 
 
 
155
  ## Community
156
- * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
157
  * For questions or feedback please [reach out to us](mailto:[email protected]).
158
 
159
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  YoloV7 is a machine learning model that predicts bounding boxes and classes of objects in an image. This model is post-training quantized to int8 using samples from the COCO dataset.
18
 
19
+ This is based on the implementation of Yolo-v7-Quantized found
20
+ [here]({source_repo}). More details on model performance
21
+ accross various devices, can be found [here](https://aihub.qualcomm.com/models/yolov7_quantized).
 
 
22
 
23
  ### Model Details
24
 
 
29
  - Number of parameters: 6.24M
30
  - Model size: 6.23 MB
31
 
32
+ | Model | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Precision | Primary Compute Unit | Target Model
33
+ |---|---|---|---|---|---|---|---|---|
34
+ | Yolo-v7-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | TFLITE | 4.395 ms | 0 - 2 MB | INT8 | NPU | -- |
35
+ | Yolo-v7-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | QNN | 4.817 ms | 0 - 10 MB | INT8 | NPU | -- |
36
+ | Yolo-v7-Quantized | Samsung Galaxy S23 | Snapdragon® 8 Gen 2 | ONNX | 7.451 ms | 0 - 12 MB | INT8 | NPU | -- |
37
+ | Yolo-v7-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | TFLITE | 2.825 ms | 0 - 73 MB | INT8 | NPU | -- |
38
+ | Yolo-v7-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 3.164 ms | 1 - 57 MB | INT8 | NPU | -- |
39
+ | Yolo-v7-Quantized | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | ONNX | 5.362 ms | 0 - 122 MB | INT8 | NPU | -- |
40
+ | Yolo-v7-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | TFLITE | 9.943 ms | 0 - 71 MB | INT8 | NPU | -- |
41
+ | Yolo-v7-Quantized | RB3 Gen 2 (Proxy) | QCS6490 Proxy | QNN | 13.531 ms | 2 - 9 MB | INT8 | NPU | -- |
42
+ | Yolo-v7-Quantized | RB5 (Proxy) | QCS8250 Proxy | TFLITE | 96.943 ms | 4 - 34 MB | INT8 | GPU | -- |
43
+ | Yolo-v7-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | TFLITE | 4.372 ms | 0 - 4 MB | INT8 | NPU | -- |
44
+ | Yolo-v7-Quantized | QCS8550 (Proxy) | QCS8550 Proxy | QNN | 3.741 ms | 1 - 3 MB | INT8 | NPU | -- |
45
+ | Yolo-v7-Quantized | SA8255 (Proxy) | SA8255P Proxy | TFLITE | 4.375 ms | 0 - 1 MB | INT8 | NPU | -- |
46
+ | Yolo-v7-Quantized | SA8255 (Proxy) | SA8255P Proxy | QNN | 3.786 ms | 1 - 2 MB | INT8 | NPU | -- |
47
+ | Yolo-v7-Quantized | SA8775 (Proxy) | SA8775P Proxy | TFLITE | 4.36 ms | 0 - 2 MB | INT8 | NPU | -- |
48
+ | Yolo-v7-Quantized | SA8775 (Proxy) | SA8775P Proxy | QNN | 3.741 ms | 1 - 3 MB | INT8 | NPU | -- |
49
+ | Yolo-v7-Quantized | SA8650 (Proxy) | SA8650P Proxy | TFLITE | 4.402 ms | 1 - 3 MB | INT8 | NPU | -- |
50
+ | Yolo-v7-Quantized | SA8650 (Proxy) | SA8650P Proxy | QNN | 3.749 ms | 1 - 3 MB | INT8 | NPU | -- |
51
+ | Yolo-v7-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | TFLITE | 5.008 ms | 0 - 78 MB | INT8 | NPU | -- |
52
+ | Yolo-v7-Quantized | QCS8450 (Proxy) | QCS8450 Proxy | QNN | 4.645 ms | 1 - 60 MB | INT8 | NPU | -- |
53
+ | Yolo-v7-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | TFLITE | 2.893 ms | 0 - 52 MB | INT8 | NPU | -- |
54
+ | Yolo-v7-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 3.348 ms | 1 - 50 MB | INT8 | NPU | -- |
55
+ | Yolo-v7-Quantized | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | ONNX | 5.191 ms | 2 - 90 MB | INT8 | NPU | -- |
56
+ | Yolo-v7-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 4.189 ms | 1 - 1 MB | INT8 | NPU | -- |
57
+ | Yolo-v7-Quantized | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 9.178 ms | 8 - 8 MB | INT8 | NPU | -- |
58
 
59
 
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
+ ## License
63
+ * The license for the original implementation of Yolo-v7-Quantized can be found [here](https://github.com/WongKinYiu/yolov7/blob/main/LICENSE.md).
64
+ * The license for the compiled assets for on-device deployment can be found [here](https://github.com/WongKinYiu/yolov7/blob/main/LICENSE.md)
65
 
 
 
 
66
 
 
 
 
 
67
 
68
  ## References
69
  * [YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors](https://arxiv.org/abs/2207.02696)
70
  * [Source Model Implementation](https://github.com/WongKinYiu/yolov7/)
71
 
72
+
73
+
74
  ## Community
75
+ * Join [our AI Hub Slack community](https://qualcomm-ai-hub.slack.com/join/shared_invite/zt-2d5zsmas3-Sj0Q9TzslueCjS31eXG2UA#/shared-invite/email) to collaborate, post questions and learn more about on-device AI.
76
  * For questions or feedback please [reach out to us](mailto:[email protected]).
77
 
78
+ ## Usage and Limitations
79
+
80
+ Model may not be used for or in connection with any of the following applications:
81
+
82
+ - Accessing essential private and public services and benefits;
83
+ - Administration of justice and democratic processes;
84
+ - Assessing or recognizing the emotional state of a person;
85
+ - Biometric and biometrics-based systems, including categorization of persons based on sensitive characteristics;
86
+ - Education and vocational training;
87
+ - Employment and workers management;
88
+ - Exploitation of the vulnerabilities of persons resulting in harmful behavior;
89
+ - General purpose social scoring;
90
+ - Law enforcement;
91
+ - Management and operation of critical infrastructure;
92
+ - Migration, asylum and border control management;
93
+ - Predictive policing;
94
+ - Real-time remote biometric identification in public spaces;
95
+ - Recommender systems of social media platforms;
96
+ - Scraping of facial images (from the internet or otherwise); and/or
97
+ - Subliminal manipulation