TaoTao9 / EasyNet

11 stars 0 forks source link

Error when running the code python test.py --gpu_id 0 --obj_id -1 --layer_size 2layer --mode_type RGB #5

Open 1145013292 opened 7 months ago

1145013292 commented 7 months ago

the terminal says class ['bagel', 'cable_gland', 'carrot', 'cookie', 'dowel', 'foam', 'peach', 'potato', 'rope', 'tire'] will be tested! Traceback (most recent call last): File "test.py", line 251, in test_on_device(args) File "test.py", line 218, in test_on_device test_once_class(args,obj_name,dataset_checkpoint) File "test.py", line 24, in test_once_class test_loader,datas_len = get_data_loader(args,"test", class_name=obj_name,img_size=[img_dim,img_dim],batch_size=1, num_workers=0,shuffle=False) File "/ssh/EasyNet-main/data/mvtec3d_dataset.py", line 283, in get_data_loader dataset = MVTec3DTest(class_name=class_name, img_size=img_size,dataset_path=args.dataset_path_Mvtec3D_AD) File "/ssh/EasyNet-main/data/mvtec3d_dataset.py", line 188, in init self.img_paths, self.gt_paths, self.labels = self.load_dataset() # self.labels => good : 0, anomaly : 1 File "/ssh/EasyNet-main/data/mvtec3d_dataset.py", line 195, in load_dataset defect_types = os.listdir(self.img_path) FileNotFoundError: [Errno 2] No such file or directory: '/home/yangzesheng/tao_workspace/mvtec3d/bagel/test' I'm wondering where can I change the direction.

TaoTao9 commented 7 months ago

Yes, please modify the dataset_path_Mvtec3D_AD attribute in EasyNet/checkpoint/checkpoint.yaml of your project directory to your Mvtec3D dataset file path.

1145013292 commented 7 months ago

Solved, I really appreciate your reply.

---Original--- From: @.> Date: Wed, Apr 3, 2024 19:33 PM To: @.>; Cc: @.**@.>; Subject: Re: [TaoTao9/EasyNet] Error when running the code python test.py--gpu_id 0 --obj_id -1 --layer_size 2layer --mode_type RGB (Issue #5)

Yes, please modify the dataset_path_Mvtec3D_AD attribute in EasyNet/checkpoint/checkpoint.yaml of your project directory to your Mvtec3D dataset file path.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>