Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -133,14 +133,11 @@ from qai_hub_models.models.sam import SAMDecoder,SAMEncoder
|
|
133 |
|
134 |
# Load the model
|
135 |
get_sam_decoder()_model = SAMDecoder.from_pretrained()
|
136 |
-
|
137 |
get_sam_encoder()_model = SAMEncoder.from_pretrained()
|
138 |
|
139 |
-
|
140 |
# Device
|
141 |
device = hub.Device("Samsung Galaxy S23")
|
142 |
|
143 |
-
|
144 |
# Trace model
|
145 |
get_sam_decoder()_input_shape = get_sam_decoder()_model.get_input_spec()
|
146 |
get_sam_decoder()_sample_inputs = get_sam_decoder()_model.sample_inputs()
|
@@ -156,7 +153,6 @@ get_sam_decoder()_compile_job = hub.submit_compile_job(
|
|
156 |
|
157 |
# Get target model to run on-device
|
158 |
get_sam_decoder()_target_model = get_sam_decoder()_compile_job.get_target_model()
|
159 |
-
|
160 |
# Trace model
|
161 |
get_sam_encoder()_input_shape = get_sam_encoder()_model.get_input_spec()
|
162 |
get_sam_encoder()_sample_inputs = get_sam_encoder()_model.sample_inputs()
|
@@ -183,12 +179,10 @@ After compiling models from step 1. Models can be profiled model on-device using
|
|
183 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
184 |
provided job URL to view a variety of on-device performance metrics.
|
185 |
```python
|
186 |
-
|
187 |
get_sam_decoder()_profile_job = hub.submit_profile_job(
|
188 |
model=get_sam_decoder()_target_model,
|
189 |
device=device,
|
190 |
)
|
191 |
-
|
192 |
get_sam_encoder()_profile_job = hub.submit_profile_job(
|
193 |
model=get_sam_encoder()_target_model,
|
194 |
device=device,
|
|
|
133 |
|
134 |
# Load the model
|
135 |
get_sam_decoder()_model = SAMDecoder.from_pretrained()
|
|
|
136 |
get_sam_encoder()_model = SAMEncoder.from_pretrained()
|
137 |
|
|
|
138 |
# Device
|
139 |
device = hub.Device("Samsung Galaxy S23")
|
140 |
|
|
|
141 |
# Trace model
|
142 |
get_sam_decoder()_input_shape = get_sam_decoder()_model.get_input_spec()
|
143 |
get_sam_decoder()_sample_inputs = get_sam_decoder()_model.sample_inputs()
|
|
|
153 |
|
154 |
# Get target model to run on-device
|
155 |
get_sam_decoder()_target_model = get_sam_decoder()_compile_job.get_target_model()
|
|
|
156 |
# Trace model
|
157 |
get_sam_encoder()_input_shape = get_sam_encoder()_model.get_input_spec()
|
158 |
get_sam_encoder()_sample_inputs = get_sam_encoder()_model.sample_inputs()
|
|
|
179 |
provisioned in the cloud. Once the job is submitted, you can navigate to a
|
180 |
provided job URL to view a variety of on-device performance metrics.
|
181 |
```python
|
|
|
182 |
get_sam_decoder()_profile_job = hub.submit_profile_job(
|
183 |
model=get_sam_decoder()_target_model,
|
184 |
device=device,
|
185 |
)
|
|
|
186 |
get_sam_encoder()_profile_job = hub.submit_profile_job(
|
187 |
model=get_sam_encoder()_target_model,
|
188 |
device=device,
|