developer0hye / Yolo_Label

GUI for marking bounded boxes of objects in images for training neural network YOLO
MIT License
490 stars 114 forks source link

Add a newline on every line. #32

Closed NorwegianRockCat closed 4 years ago

NorwegianRockCat commented 4 years ago

Text files should have a newline as their last character. This isn't strictly required (many tools will work), but it makes parsing of these files easier, plus it keeps the txt files similar with other image datasets.

developer0hye commented 4 years ago

@NorwegianRockCat Good Solution! Have you generated dataset after this modification and trained or tested it on YOLO implementations?

I am worry about the newline in the end line.

NorwegianRockCat commented 4 years ago

I have tested this by opening up a set of images I had previously tagged and running through the entire set. It worked exactly as I expected (i.e., the last line got a newline). I then ran that dataset through a run on darknet and it worked fine. Incidentally, it was because the labels generated from Yolo_Label were different from my other image sets that prompted me to investigate. That is, they had a newline at the end of the file, Yolo_Label ones didn't.

As for adding a newline at the end of the file. This is correct behavior. I am following the conventions of the open group standard. Others have explained it better in this StackOverflow thread.

developer0hye commented 4 years ago

@NorwegianRockCat Thanks for your great contribution!