Data set making - batch image format error

ffmpeg batch image format error

Yolo data set during the training process, accidentally found his picture contains images in JPEG format, and the project required picture format jpg, therefore frequent error. After examination revealed annotations in the xml file also exists in the file format problems, so you need to format the picture batch processing, and then re-generate the xml file tagging.

Picture format using ffmpeg command batch

Here Insert Picture DescriptionIn JPEGImages start ffmpeg folder, and then type the above command.

for %a in ("*.jpeg") do ffmpeg -i "%a" "image\%~na.jpg"

In which the image is in the original folder new folder, after this format conversion of image files, will be placed under the folder, separate from the original file; otherwise, prior to conversion, and the converted images are under the original folder, it is trouble.

But also can batch convert video file format with ffmpeg command.

Released four original articles · won praise 4 · Views 1425

Guess you like

Origin blog.csdn.net/lyrun1/article/details/104481444