Error running "test_PVQ_on_new_datasets.ipynb"
There is an error when I run "test_PVQ_on_new_datasets.ipynb" on Colab. I only changed the "dir" parameter sent to SingleVideo2MOS.from_dict. Could you help me with this? Thank you very much.
WARNING:root:setattr roi_col not existed WARNING:root:roipool: size = (2, 2), scale = 1/32 WARNING:root:setattr vid_id not existed
0%| | 0/22 [00:00<?, ?it/s]WARNING:root:setattr split_mode not existed Loading data...G005
AttributeError Traceback (most recent call last)
7 frames /content/PatchVQ/fastiqa/iqa_exp.py in run(self, func, destroy, append) 149 150 if type(self.gpu) is int: --> 151 func(learn) 152 else: # None or True/False (cpu or multi-gpus) 153 ctx = learn.parallel_ctx
/content/PatchVQ/fastiqa/learn.py in extract_features(self, on, name, cache, skip_exist) 122 if hasattr(self.model, 'rois'): 123 self.model.rois = None --> 124 preds = self.get_preds() # get preds on one video with several batches 125 self.model.output_features = old_setting 126
/usr/local/lib/python3.7/dist-packages/fastai/learner.py in get_preds(self, ds_idx, dl, with_input, with_decoded, with_loss, act, inner, reorder, cbs, **kwargs) 225 def get_preds(self, ds_idx=1, dl=None, with_input=False, with_decoded=False, with_loss=False, act=None, 226 inner=False, reorder=True, cbs=None, **kwargs): --> 227 if dl is None: dl = self.dls[ds_idx].new(shuffled=False, drop_last=False) 228 if reorder and hasattr(dl, 'get_idxs'): 229 idxs = dl.get_idxs()
/content/PatchVQ/fastiqa/bunch.py in getitem(self, index) 156 if self._loading or self._bunching: 157 raise AttributeError(f"index={index}: '{self}' data not loaded yet. loading={self._loading}, bunching={self._bunching}") --> 158 return self._data[index] 159 160 def getattr(self, k: str):
/content/PatchVQ/fastiqa/bunch.py in getattr(self, k) 161 # fail to get attributes, fetch it from self.data 162 if self._loading or self._bunching: --> 163 raise AttributeError(f"key={k}: '{self}' data not loaded yet. loading={self._loading}, bunching={self._bunching}") 164 return getattr(self._data, k) 165
AttributeError: key=_data: 'G005' data not loaded yet. loading=True, bunching=False
I have extract the frames for G005
!ls data/LIVE_VQC_tiny/jpg/G005 | wc -l
#return: 301
老哥解决了嘛