pytorch-YOLOv4 icon indicating copy to clipboard operation
pytorch-YOLOv4 copied to clipboard

Training Custom Dataset using tiny-yolo-v4

Open rak7045 opened this issue 2 years ago • 1 comments

Hello @Tianxiaomo, I am trying to train my custom dataset using tiny-yolo-v4. I have made changes in the .cfg file and trying to train the network. The following error has been raised. Do you have any idea on this? Could you please help me to sort this?

tiny yolo error

For clarification, I have used weights file downloaded from Yolo website, since you do not have the weights file for tiny yolov4. I have given train.txt path and path for images as you mentioned. While training I got error such as "ValueError: string could not be converted into float". I have written this piece of code where the error is resolved.(Line 258 in dataset.py)

data = line.strip().replace("\n","").replace("\r", "").replace(" ", "$") #print(data) #data = data.replace(",$", ",") data = data.replace("$", " ") data = data.split(" ") truth[data[0]] = [] for i in data[1:]: truth[data[0]].append([float(j) for j in i.split(',')]) (Might be helpful to someone)

rak7045 avatar Sep 29 '21 08:09 rak7045

Hello @Tianxiaomo, I am trying to train my custom dataset using tiny-yolo-v4. I have made changes in the .cfg file and trying to train the network. The following error has been raised. Do you have any idea on this? Could you please help me to sort this?

tiny yolo error

For clarification, I have used weights file downloaded from Yolo website, since you do not have the weights file for tiny yolov4. I have given train.txt path and path for images as you mentioned. While training I got error such as "ValueError: string could not be converted into float". I have written this piece of code where the error is resolved.(Line 258 in dataset.py)

data = line.strip().replace("\n","").replace("\r", "").replace(" ", "$") #print(data) #data = data.replace(",$", ",") data = data.replace("$", " ") data = data.split(" ") truth[data[0]] = [] for i in data[1:]: truth[data[0]].append([float(j) for j in i.split(',')]) (Might be helpful to someone)

turn strides in train.py around in the opposite direction

pavlik-tikhomirov avatar Aug 11 '22 11:08 pavlik-tikhomirov