Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -135,14 +135,11 @@ from qai_hub_models.models.mediapipe_hand import MediaPipeHandDetector,MediaPipe
|
|
| 135 |
|
| 136 |
# Load the model
|
| 137 |
hand_detector_model = MediaPipeHandDetector.from_pretrained()
|
| 138 |
-
|
| 139 |
hand_landmark_detector_model = MediaPipeHandLandmarkDetector.from_pretrained()
|
| 140 |
|
| 141 |
-
|
| 142 |
# Device
|
| 143 |
device = hub.Device("Samsung Galaxy S23")
|
| 144 |
|
| 145 |
-
|
| 146 |
# Trace model
|
| 147 |
hand_detector_input_shape = hand_detector_model.get_input_spec()
|
| 148 |
hand_detector_sample_inputs = hand_detector_model.sample_inputs()
|
|
@@ -158,7 +155,6 @@ hand_detector_compile_job = hub.submit_compile_job(
|
|
| 158 |
|
| 159 |
# Get target model to run on-device
|
| 160 |
hand_detector_target_model = hand_detector_compile_job.get_target_model()
|
| 161 |
-
|
| 162 |
# Trace model
|
| 163 |
hand_landmark_detector_input_shape = hand_landmark_detector_model.get_input_spec()
|
| 164 |
hand_landmark_detector_sample_inputs = hand_landmark_detector_model.sample_inputs()
|
|
@@ -185,12 +181,10 @@ After compiling models from step 1. Models can be profiled model on-device using
|
|
| 185 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
| 186 |
provided job URL to view a variety of on-device performance metrics.
|
| 187 |
```python
|
| 188 |
-
|
| 189 |
hand_detector_profile_job = hub.submit_profile_job(
|
| 190 |
model=hand_detector_target_model,
|
| 191 |
device=device,
|
| 192 |
)
|
| 193 |
-
|
| 194 |
hand_landmark_detector_profile_job = hub.submit_profile_job(
|
| 195 |
model=hand_landmark_detector_target_model,
|
| 196 |
device=device,
|
|
|
|
| 135 |
|
| 136 |
# Load the model
|
| 137 |
hand_detector_model = MediaPipeHandDetector.from_pretrained()
|
|
|
|
| 138 |
hand_landmark_detector_model = MediaPipeHandLandmarkDetector.from_pretrained()
|
| 139 |
|
|
|
|
| 140 |
# Device
|
| 141 |
device = hub.Device("Samsung Galaxy S23")
|
| 142 |
|
|
|
|
| 143 |
# Trace model
|
| 144 |
hand_detector_input_shape = hand_detector_model.get_input_spec()
|
| 145 |
hand_detector_sample_inputs = hand_detector_model.sample_inputs()
|
|
|
|
| 155 |
|
| 156 |
# Get target model to run on-device
|
| 157 |
hand_detector_target_model = hand_detector_compile_job.get_target_model()
|
|
|
|
| 158 |
# Trace model
|
| 159 |
hand_landmark_detector_input_shape = hand_landmark_detector_model.get_input_spec()
|
| 160 |
hand_landmark_detector_sample_inputs = hand_landmark_detector_model.sample_inputs()
|
|
|
|
| 181 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
| 182 |
provided job URL to view a variety of on-device performance metrics.
|
| 183 |
```python
|
|
|
|
| 184 |
hand_detector_profile_job = hub.submit_profile_job(
|
| 185 |
model=hand_detector_target_model,
|
| 186 |
device=device,
|
| 187 |
)
|
|
|
|
| 188 |
hand_landmark_detector_profile_job = hub.submit_profile_job(
|
| 189 |
model=hand_landmark_detector_target_model,
|
| 190 |
device=device,
|