DeepBelief_Course5_Examples icon indicating copy to clipboard operation
DeepBelief_Course5_Examples copied to clipboard

在data_provider=load_examples_data('people')發生問題

Open JetTan2020 opened this issue 4 years ago • 3 comments

你好:

我複製了去背神器中,background_removal.ipynb裡的程式碼到電腦中執行(input 1, input 3, intput 4) 在data_provider=load_examples_data('people')發生

archive file is already existing, donnot need download again. extraction is finished, donnot need extract again. Traceback (most recent call last): File "C:\Users\jet58\Desktop\去背神器測試20201220.py", line 27, in data_provider=load_examples_data('people') File "C:\Program Files\Python38\lib\site-packages\trident\data\data_loaders.py", line 703, in load_examples_data mskdata = MaskDataset(masks=masks, expect_data_type=ExpectDataType.binary_mask) File "C:\Program Files\Python38\lib\site-packages\trident\data\dataset.py", line 389, in init self._element_spec = TensorSpec(shape=to_tensor(int_shape(self.list[0])).to('int'), name=self.symbol, object_type=self.object_type, is_spatial=True) File "C:\Program Files\Python38\lib\site-packages\trident\backend\pytorch_ops.py", line 334, in int_shape return tuple([item for item in x.shape]) AttributeError: 'str' object has no attribute 'shape'

之前好像在下載people.tar時失敗了 所以我的.tar檔是從失敗時提供的url下載的,不知是否有相關。

另外,因為不清楚有無相關,附上import這段的資訊 trident 0.6.1 Pillow version:7.2.0. Pytorch version:1.7.0+cpu. Automatic Mixed Precision Support:False. Using Pytorch backend. Image Data Format: channels_first. Image Channel Order: rgb. Using pillow image backend.

目前還在學習如何使用github,為有不周到之處感到抱歉。

JetTan2020 avatar Dec 20 '20 09:12 JetTan2020

我確認一下再回復您

AllanYiin avatar Dec 30 '20 03:12 AllanYiin

我推送了trident 0.7 你可以透過pip install tridentx --upgrade來更新 以及推送了更新的去背神器notebook 就能解決你的問題,若有其他問題歡迎提出

AllanYiin avatar Dec 30 '20 10:12 AllanYiin

十分感謝

JetTan2020 avatar Dec 30 '20 12:12 JetTan2020