I am using roboflow dataset to train yolov4 pytorch but why did I get this error? Can someone help? Thank you

Object detection problem
YOLOv4 pytorch from: GitHub - Tianxiaomo/pytorch-YOLOv4: PyTorch ,ONNX and TensorRT implementation of YOLOv4

Why when I using roboflow dataset and use it in YOLOv4 pytorch, it appears this error?
ValueError: invalid literal for int() with base 10: ‘000037_jpg.rf.5c9063a3fc4352fed0729e91f7a6f508’


Noted that I am using YOLOv4 pytorch from GitHub - Tianxiaomo/pytorch-YOLOv4: PyTorch ,ONNX and TensorRT implementation of YOLOv4 not yours because yours didnt output mAP

Hi @MheadHero

I found the same error in the Issues section on the repo you shared. Have you tried eg: int(float("50.00")) ? Below is the issue for reference

Hi, actually I look thru all this repo already. I found that this is the issue happens when the dataset.py file want to get the unique key. And the problem now is, roboflow export the dataset with the filename of 2 types.

  1. 000133_JPG.rf.6cad57dd6917906c1577a643ebb339a1.jpg
  2. IMG_4852_JPG.rf.3e0f1a273ca0769c5c981929159d32a0.jpg

So when it comes to a yolov4 function which is get_img_id(). The purpose of this function is to create unique key for all images.

So, how can I create my own get_img_id() to fullfil the 2 conditions from roboflow dataset?
Noted that the unique id in yolov4 must be integer.