lppllppl920 / EndoscopyDepthEstimation-Pytorch

Official Repo for the paper "Dense Depth Estimation in Monocular Endoscopy with Self-supervised Learning Methods" (TMI)
GNU General Public License v3.0
124 stars 27 forks source link

run train.py #9

Closed caozhengtao110 closed 4 years ago

caozhengtao110 commented 4 years ago

An error message appears at runtime: AttributeError: 'SfMDataset' object has no attribute 'pre_workers'

Is it because of the lack of data set? Can you provide a data set?

I am looking forward to your reply. Wish you a happy life and good luck in your work!

lppllppl920 commented 4 years ago

There was a bug in the dataset class where I did not change pre_workers to num_pre_workers. This argument specifies how many threads will be used to calculate intermediate data for network training. I did provide a small data example in this repo, therefore it may not be the problem of lack of data.

lppllppl920 commented 4 years ago

Please update your code and let me know if there is any error.

caozhengtao110 commented 4 years ago

I feel very lucky and excited to receive your reply! I still get some errors when I run the code:

1. Traceback (most recent call last): File "train.py", line 149, in "_".join(testing_patient_id)) TypeError: sequence item 0: expected str instance, int found

2. Tensorboard visualization at depth_estimation_train_run_6_22_11_48_testid[1] Traceback (most recent call last): File "train.py", line 172, in rgb_mode="rgb", num_iter=num_iter) File "/home/siat/下载/EndoscopyDepthEstimation-Pytorch-master3/dataset.py", line 174, in init interval = len(self.folder_list) / self.num_pre_workers ZeroDivisionError: division by zero

Thank you very much for forgiving my stupidity and giving me advice!

caozhengtao110 commented 4 years ago

image size calculation failed. Traceback (most recent call last): File "train.py", line 172, in rgb_mode="rgb", num_iter=num_iter) File "/home/siat/EndoscopyDepthEstimation-Pytorch-master2/dataset.py", line 211, in init raise IOError OSError

caozhengtao110 commented 4 years ago

Thank you very much. The problem has been solved. I wrote the wrong path

YanhaoZhang commented 3 years ago

Hi @caozhengtao110, I also got the same error as follow. May I ask you how did you solve it? Thank you very much.

Traceback (most recent call last): File "train.py", line 149, in "_".join(testing_patient_id)) TypeError: sequence item 0: expected str instance, int found

caozhengtao110 commented 3 years ago

@YanhaoZhang str(testing_patient_id) You can try it,

YanhaoZhang commented 3 years ago

@caozhengtao110 Many thanks for your prompt reply!