From 9a188586a3e8e1f917b39ed3c7096f8376147b7a Mon Sep 17 00:00:00 2001 From: 2trvl <38960745+2trvl@users.noreply.github.com> Date: Tue, 28 Mar 2023 00:43:04 +0300 Subject: [PATCH] use crossplatform paths instead of unix-style --- IS-Net/Inference.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/IS-Net/Inference.py b/IS-Net/Inference.py index 0b2907d..4c959f0 100644 --- a/IS-Net/Inference.py +++ b/IS-Net/Inference.py @@ -17,9 +17,11 @@ from models import * if __name__ == "__main__": - dataset_path="../demo_datasets/your_dataset" #Your dataset path - model_path="../saved_models/IS-Net/isnet-general-use.pth" # the model path - result_path="../demo_datasets/your_dataset_result" #The folder path that you want to save the results + root_path=os.path.abspath(__file__) + root_path=os.path.dirname(os.path.dirname(root_path)) + dataset_path=os.path.join(root_path, "demo_datasets", "your_dataset") # Your dataset path + model_path=os.path.join(root_path, "saved_models", "IS-Net", "isnet-general-use.pth") # the model path + result_path=os.path.join(root_path, "demo_datasets", "your_dataset_result") # The folder path that you want to save the results input_size=[1024,1024] net=ISNetDIS()