Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -136,14 +136,11 @@ from qai_hub_models.models.mediapipe_face import MediaPipeFaceDetector,MediaPipe
|
|
| 136 |
|
| 137 |
# Load the model
|
| 138 |
face_detector_model = MediaPipeFaceDetector.from_pretrained()
|
| 139 |
-
|
| 140 |
face_landmark_detector_model = MediaPipeFaceLandmarkDetector.from_pretrained()
|
| 141 |
|
| 142 |
-
|
| 143 |
# Device
|
| 144 |
device = hub.Device("Samsung Galaxy S23")
|
| 145 |
|
| 146 |
-
|
| 147 |
# Trace model
|
| 148 |
face_detector_input_shape = face_detector_model.get_input_spec()
|
| 149 |
face_detector_sample_inputs = face_detector_model.sample_inputs()
|
|
@@ -159,7 +156,6 @@ face_detector_compile_job = hub.submit_compile_job(
|
|
| 159 |
|
| 160 |
# Get target model to run on-device
|
| 161 |
face_detector_target_model = face_detector_compile_job.get_target_model()
|
| 162 |
-
|
| 163 |
# Trace model
|
| 164 |
face_landmark_detector_input_shape = face_landmark_detector_model.get_input_spec()
|
| 165 |
face_landmark_detector_sample_inputs = face_landmark_detector_model.sample_inputs()
|
|
@@ -186,12 +182,10 @@ After compiling models from step 1. Models can be profiled model on-device using
|
|
| 186 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
| 187 |
provided job URL to view a variety of on-device performance metrics.
|
| 188 |
```python
|
| 189 |
-
|
| 190 |
face_detector_profile_job = hub.submit_profile_job(
|
| 191 |
model=face_detector_target_model,
|
| 192 |
device=device,
|
| 193 |
)
|
| 194 |
-
|
| 195 |
face_landmark_detector_profile_job = hub.submit_profile_job(
|
| 196 |
model=face_landmark_detector_target_model,
|
| 197 |
device=device,
|
|
|
|
| 136 |
|
| 137 |
# Load the model
|
| 138 |
face_detector_model = MediaPipeFaceDetector.from_pretrained()
|
|
|
|
| 139 |
face_landmark_detector_model = MediaPipeFaceLandmarkDetector.from_pretrained()
|
| 140 |
|
|
|
|
| 141 |
# Device
|
| 142 |
device = hub.Device("Samsung Galaxy S23")
|
| 143 |
|
|
|
|
| 144 |
# Trace model
|
| 145 |
face_detector_input_shape = face_detector_model.get_input_spec()
|
| 146 |
face_detector_sample_inputs = face_detector_model.sample_inputs()
|
|
|
|
| 156 |
|
| 157 |
# Get target model to run on-device
|
| 158 |
face_detector_target_model = face_detector_compile_job.get_target_model()
|
|
|
|
| 159 |
# Trace model
|
| 160 |
face_landmark_detector_input_shape = face_landmark_detector_model.get_input_spec()
|
| 161 |
face_landmark_detector_sample_inputs = face_landmark_detector_model.sample_inputs()
|
|
|
|
| 182 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
| 183 |
provided job URL to view a variety of on-device performance metrics.
|
| 184 |
```python
|
|
|
|
| 185 |
face_detector_profile_job = hub.submit_profile_job(
|
| 186 |
model=face_detector_target_model,
|
| 187 |
device=device,
|
| 188 |
)
|
|
|
|
| 189 |
face_landmark_detector_profile_job = hub.submit_profile_job(
|
| 190 |
model=face_landmark_detector_target_model,
|
| 191 |
device=device,
|