Update example_inference.py
Browse files- example_inference.py +2 -2
example_inference.py
CHANGED
|
@@ -6,8 +6,8 @@ from utilities import preprocess_image, postprocess_image
|
|
| 6 |
|
| 7 |
def example_inference():
|
| 8 |
|
| 9 |
-
model_path = f"{os.path.dirname(__file__)}/model.pth"
|
| 10 |
-
im_path = f"{os.path.dirname(__file__)}/example_input.jpg"
|
| 11 |
|
| 12 |
net = BriaRMBG()
|
| 13 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
|
| 6 |
|
| 7 |
def example_inference():
|
| 8 |
|
| 9 |
+
model_path = f"{os.path.dirname(os.path.abspath(__file__))}/model.pth"
|
| 10 |
+
im_path = f"{os.path.dirname(os.path.abspath(__file__))}/example_input.jpg"
|
| 11 |
|
| 12 |
net = BriaRMBG()
|
| 13 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|