mirror of
https://github.com/xuebinqin/DIS.git
synced 2024-11-26 08:43:17 +01:00
Modify inference.py
This commit is contained in:
parent
996c9495d4
commit
f3837183a3
@ -30,6 +30,7 @@ if __name__ == "__main__":
|
|||||||
net.load_state_dict(torch.load(model_path,map_location="cpu"))
|
net.load_state_dict(torch.load(model_path,map_location="cpu"))
|
||||||
net.eval()
|
net.eval()
|
||||||
im_list = glob(dataset_path+"/*.jpg")+glob(dataset_path+"/*.JPG")+glob(dataset_path+"/*.jpeg")+glob(dataset_path+"/*.JPEG")+glob(dataset_path+"/*.png")+glob(dataset_path+"/*.PNG")+glob(dataset_path+"/*.bmp")+glob(dataset_path+"/*.BMP")+glob(dataset_path+"/*.tiff")+glob(dataset_path+"/*.TIFF")
|
im_list = glob(dataset_path+"/*.jpg")+glob(dataset_path+"/*.JPG")+glob(dataset_path+"/*.jpeg")+glob(dataset_path+"/*.JPEG")+glob(dataset_path+"/*.png")+glob(dataset_path+"/*.PNG")+glob(dataset_path+"/*.bmp")+glob(dataset_path+"/*.BMP")+glob(dataset_path+"/*.tiff")+glob(dataset_path+"/*.TIFF")
|
||||||
|
with torch.no_grad():
|
||||||
for i, im_path in tqdm(enumerate(im_list), total=len(im_list)):
|
for i, im_path in tqdm(enumerate(im_list), total=len(im_list)):
|
||||||
print("im_path: ", im_path)
|
print("im_path: ", im_path)
|
||||||
im = io.imread(im_path)
|
im = io.imread(im_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user