TUI-NICR / ESANet

ESANet: Efficient RGB-D Semantic Segmentation for Indoor Scene Analysis
Other
231 stars 49 forks source link

can not train on SUNRGBD #30

Open 18306125266 opened 2 years ago

18306125266 commented 2 years ago

I change the SE model,and I want to train the neural network on SUNRGBD.

I run the prepare_datasets.py .extract the images 、depths and labels.

When i run the train.py ,there report :

Compute class weights Traceback (most recent call last): File "train.py", line 552, in train_main() File "train.py", line 87, in train_main c=args.c_for_logarithmic_weighting) File "/data/run01/scv2391/ESANet-main/src/datasets/dataset_base.py", line 169, in compute_class_weights label = self.load_label(i) File "/data/run01/scv2391/ESANet-main/src/datasets/sunrgbd/pytorch_dataset.py", line 134, in load_label label_dir[idx])).astype(np.uint8) File "/data/home/scv2391/.conda/envs/rgbd_segmentation/lib/python3.7/site-packages/numpy/lib/npyio.py", line 416, in load fid = stack.enter_context(open(os_fspath(file), "rb")) FileNotFoundError: [Errno 2] No such file or directory: 'output_path-sun/SUNRGBD/kv2/kinect2data/000065_2014-05-16_20-14-38_260595134347_rgbf000121-resize\label/label.npy'

But the label.npy exists .IS the '\' due to the error ? How can i correct it ? thank you ! image

danielS91 commented 2 years ago

The problem comes from this os.path.join here, which adds the Windows path separator between the predefined path components. You can try to join the paths manually using "/" - python on Windows should be able to handle "/" when used consistently.

Anyhow, do not use Windows - the whole codebase is not tested on Windows.

mmmcn commented 2 years ago

@18306125266 Hi, have you tested the pretrained model on SUNRGBD dataset using eval.py, my miou is very low, I don't know where the problem is.

18306125266 commented 2 years ago

 Thank you。I corret the error.  

New questions arose.I just changed the  attention mechanism by PSA. 

This is the PSA .

mmmcn commented 2 years ago

Sorry, I have solved my problem, the problem is that the mIOU metric I implemented have a little bug.