ValueError: cannot convert float NaN to integer
I am having a very weird issue. I have a dataset with coco format annotations, it works quite well and I have one that was initially labeled through yolo format, and I converted it to coco. I've done some bboxes exploration and I'm pretty sure the json works fine. But weirdly, in this dataset the training does not work properly. I have done 2 minor changes in your coco.py file (line 46, cause the code wouldn't run with enumerate starting from 0) and in your train.py (line 76, I think there was an update for it, not sure but it would not run otherwise)
The output for it is as follows:
Error executing job with overrides: [] Traceback (most recent call last): File "/home/[email protected]/centernet-error_reproduction/centernet-uda/train.py", line 194, in main tensorboard_logger.log_detections( File "/home/[email protected]/centernet-error_reproduction/centernet-uda/utils/tensorboard.py", line 28, in log_detections result = self.visualizer.visualize_detections( File "/home/[email protected]/centernet-error_reproduction/centernet-uda/utils/visualize.py", line 40, in visualize_detections pred_img, gt_img = self.__draw_boxes( File "/home/[email protected]/centernet-error_reproduction/centernet-uda/utils/visualize.py", line 73, in draw_boxes pred_img = bb.draw_box_on_image( File "/home/[email protected]/conda/conda_envs/error/lib/python3.10/site-packages/imgaug/augmentables/bbs.py", line 861, in draw_box_on_image y1, y2, x1, x2 = self.y1_int, self.y2_int, self.x1_int, self.x2_int File "/home/[email protected]/conda/conda_envs/error/lib/python3.10/site-packages/imgaug/augmentables/bbs.py", line 106, in y1_int return int(np.round(self.y1)) ValueError: cannot convert float NaN to integer
if you want to replicate my error, I have a folder in drive to do so. I used a "mini" dataset for it, less than 100 images. https://drive.google.com/drive/folders/1QknNVN8zLSa2cxNMrx2xOtbApZc1PnrH?usp=drive_link