I want to train 4channels image in mmdetection. But I don't know how to modify codes.
How can I do this?
First, I tried to modify call function in class LoadImageFromFile in mmdetection/mmdet/datasets/pipelines/loading.py, but I got error.
def __call__(self, results): ...... results['filename'] = filename results['ori_filename'] = results['img_info']['filename'] results['img'] = img results['img_shape'] = img.shape results['ori_shape'] = img.shape results['img_fields'] = ['img'] return resultsSecond, I tried to modify getitem function in class CustomDatset in mmdetection/mmdet/datasets/custom.py
if self.test_mode: return self.prepare_test_img(idx) while True: data = self.prepare_train_img(idx) if data is None: idx = self._rand_another(idx) continue return dataI modified data['img'] to custom image, but I failed.