YOLO-Annotation-Tool icon indicating copy to clipboard operation
YOLO-Annotation-Tool copied to clipboard

invalid literal for float()

Open Aurellie opened this issue 6 years ago • 9 comments

I'm trying to train my own data on the Yolo network, but before that I have to convert the bounding boxes co-ordinates to the form it wants. and i get the error: first it prints out all the file names and the content of the data then

1 29 45 615 251

['1\n29', '45', '615', '251\n'] 1 29 (803, 624) Traceback (most recent call last): File "convert.py", line 96, in print(float(xmin), float(xmax), float(ymin), float(ymax)) ValueError: invalid literal for float(): 1 29 I need help please. I don't know what to do

Aurellie avatar Apr 11 '19 17:04 Aurellie

Hi @Aurellie Please change your python version and run it.

ManivannanMurugavel avatar Apr 12 '19 11:04 ManivannanMurugavel

@ManivannanMurugavel I have the same issue, which python version should I use?

MuhammadAsadJaved avatar Jun 10 '19 07:06 MuhammadAsadJaved

Hi @MuhammadAsadJaved Please use my latest annotation tool

ManivannanMurugavel avatar Jun 10 '19 19:06 ManivannanMurugavel

Hello dear, thanks for your response, in the tool you pre-define two classes while labeling images, however i am working on single class problem, i am detecting a screen from the given images, How can i manage it? can i remove classes from the code? @ManivannanMurugavel

MuhammadAsadJaved avatar Jun 13 '19 03:06 MuhammadAsadJaved

Now i am using new tool, i change the classes in the Classes.txt file, then i labeled 10 images to test it and after successfully labeling them i run process. py, there was no error buy test.txt and train.txt files are empty.

MuhammadAsadJaved avatar Jun 13 '19 04:06 MuhammadAsadJaved

This is not an issue. Please check the directory which contains the all .txt files.

ManivannanMurugavel avatar Jun 13 '19 07:06 ManivannanMurugavel

Bro now i have 10 sample images in the Images/001 folder and 10 corresponding .txt files in the Labels/001 folder. So how i can start training Yolo2 or Yolo3 model ? are these images already in the Yolo formate? How can i create train.txt and test.txt files or it do not require? @ManivannanMurugavel

MuhammadAsadJaved avatar Jun 13 '19 07:06 MuhammadAsadJaved

Hi @MuhammadAsadJaved, First, you copy all images and it's corresponding .txt files and paste into sample folder. Set your folder path in this line https://github.com/ManivannanMurugavel/YOLO-Annotation-Tool/blob/master/process.py#L8 and run it.

ManivannanMurugavel avatar Jun 13 '19 08:06 ManivannanMurugavel

Thank you very much bro, This problem is resolved now. I sent you a message on Faccebook, Please reply if it is appropriate. https://www.facebook.com/M.asad.javed.gujjar @ManivannanMurugavel

MuhammadAsadJaved avatar Jun 13 '19 09:06 MuhammadAsadJaved