SDM-UniPS: Scalable, Detailed, and Mask-Free Universal Photometric Stereo
根据Readme中所述输入:
python sdm_unips/main.py --session_name SDM-UniPS --test_dir Dataset/apple --checkpoint checkpoint
出现以下报错:
Testing on L (1).jpg
Traceback (most recent call last):
File "sdm_unips/main.py", line 60, in <module>
main()
File "sdm_unips/main.py", line 48, in main
sdf_unips.run(testdata=test_data,
File "/home/...../sdm_unips/modules/builder/builder.py", line 62, in run
for batch_test in test_data_loader:
File "/home/...../lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
data = self._next_data()
File "/home/...../lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 561, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/...../lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/...../lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/..../sdm_unips/modules/io/dataio.py", line 44, in __getitem__
img = self.data.I.transpose(2,0,1,3) # c, h, w, N
AttributeError: 'dataloader' object has no attribute 'I'
我输出了一下self.data的属性,如下所示:
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'ctype', 'data_workspace', 'img_tile', 'load', 'mask_margin', 'numberOfImages', 'objname', 'outdir', 'use_mask']
那这行代码的作用是什么呢?
img = self.data.I.transpose(2,0,1,3)
有无成功运行的uu,在线求指导!