Skip to content

Commit 0ba6b8d

Browse files
Shiva ChilukamariShiva Chilukamari
authored andcommitted
Formating changes
1 parent 8c113c1 commit 0ba6b8d

5 files changed

Lines changed: 17 additions & 2 deletions

File tree

sam-vit-base/Olive/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ olive run --config sam_mask_box_decoder_qnn_fp16.json
5656
Execute 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
```

sam-vit-base/Olive/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# -------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License.
4+
# --------------------------------------------------------------------------
5+
16
class ModelConfig:
27
model_name = "facebook/sam-vit-base"
38
data_dir = "quantization_dataset"

sam-vit-base/Olive/info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ keywords:
33
qnn
44
arch: vit
55
recipes:
6-
- file: sam_vision_encoder_qnn_w8a8.json
6+
- file: "sam_vision_encoder_qnn_w8a8.json"
77
device:
88
- npu
99
ep: QNNExecutionProvider

sam-vit-base/Olive/model_patches.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# -------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License.
4+
# --------------------------------------------------------------------------
5+
16
from typing import Optional
27

38
import torch

sam-vit-base/Olive/sam_mask_generator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# -------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License.
4+
# --------------------------------------------------------------------------
5+
16
import numpy as np
27
import argparse
38
from PIL import Image

0 commit comments

Comments
 (0)