File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,5 +56,5 @@ olive run --config sam_mask_box_decoder_qnn_fp16.json
5656Execute SAM model in ** AOT Compilation Python Environment** using following command:
5757
5858``` bash
59- python sam_mask_generator.py --model_ve path/to/encoder_model.onnx --model_md path/to/decoder_model.onnx --image_path car.png --output_path car_mask.png
59+ python sam_mask_generator.py --model_ve path/to/encoder_model.onnx --model_md path/to/decoder_model.onnx --image_path car.png --point_x 450 --point_y 600 -- output_path car_mask.png
6060```
Original file line number Diff line number Diff line change 1+ # -------------------------------------------------------------------------
2+ # Copyright (c) Microsoft Corporation. All rights reserved.
3+ # Licensed under the MIT License.
4+ # --------------------------------------------------------------------------
5+
16class ModelConfig :
27 model_name = "facebook/sam-vit-base"
38 data_dir = "quantization_dataset"
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ keywords:
33 qnn
44arch : vit
55recipes :
6- - file : sam_vision_encoder_qnn_w8a8.json
6+ - file : " sam_vision_encoder_qnn_w8a8.json"
77 device :
88 - npu
99 ep : QNNExecutionProvider
Original file line number Diff line number Diff line change 1+ # -------------------------------------------------------------------------
2+ # Copyright (c) Microsoft Corporation. All rights reserved.
3+ # Licensed under the MIT License.
4+ # --------------------------------------------------------------------------
5+
16from typing import Optional
27
38import torch
Original file line number Diff line number Diff line change 1+ # -------------------------------------------------------------------------
2+ # Copyright (c) Microsoft Corporation. All rights reserved.
3+ # Licensed under the MIT License.
4+ # --------------------------------------------------------------------------
5+
16import numpy as np
27import argparse
38from PIL import Image
You can’t perform that action at this time.
0 commit comments