detectInBlur icon indicating copy to clipboard operation
detectInBlur copied to clipboard

Error when I wanna train my own data

Open HanZhaang opened this issue 3 years ago • 0 comments

Hello, thanks for your great work. but I have problem when I try to train this network with my data. Here is the trace back:

Traceback (most recent call last): File "E:\00_project\01_mouse_robot\01_code\detectInBlur\train.py", line 488, in main(args) File "E:\00_project\01_mouse_robot\01_code\detectInBlur\train.py", line 306, in main train_one_epoch(model = model, File "E:\00_project\01_mouse_robot\01_code\detectInBlur\engine.py", line 74, in train_one_epoch for images_CPU, targets, blur_dicts in metric_logger.log_every(data_loader, print_freq, header): File "E:\00_project\01_mouse_robot\01_code\detectInBlur\utils.py", line 670, in log_every for obj in iterable: File "D:\01_program_file\conda\envs\pytorch-env\lib\site-packages\torch\utils\data\dataloader.py", line 517, in next data = self._next_data() File "D:\01_program_file\conda\envs\pytorch-env\lib\site-packages\torch\utils\data\dataloader.py", line 557, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "D:\01_program_file\conda\envs\pytorch-env\lib\site-packages\torch\utils\data_utils\fetch.py", line 48, in fetch print("dataset = {}".format(self.dataset[idx])) File "D:\01_program_file\conda\envs\pytorch-env\lib\site-packages\torch\utils\data\dataset.py", line 330, in getitem return self.dataset[self.indices[idx]] File "E:\00_project\01_mouse_robot\01_code\detectInBlur\coco_utils.py", line 239, in getitem img, target, blur_dict = self._transforms(img, target) File "E:\00_project\01_mouse_robot\01_code\detectInBlur\transforms.py", line 46, in call image, target, blur_dict = t(image, target, blur_dict) File "E:\00_project\01_mouse_robot\01_code\detectInBlur\coco_utils.py", line 73, in call masks = convert_coco_poly_to_mask(segmentations, h, w) File "E:\00_project\01_mouse_robot\01_code\detectInBlur\coco_utils.py", line 37, in convert_coco_poly_to_mask rles = coco_mask.frPyObjects(polygons, height, width) File "pycocotools_mask.pyx", line 293, in pycocotools._mask.frPyObjects IndexError: list index out of range

Process finished with exit code 1

It works with standard coco2017 dataset, but failed with my own dataset. My data set has more than 1000 elements in the training set so I don't know why "list index out of range".

HanZhaang avatar Oct 15 '22 03:10 HanZhaang