AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.65k stars 7.96k forks source link

.tiff format #7015

Open chingi071 opened 3 years ago

chingi071 commented 3 years ago

Hello, Does darknet support picture files in .tiff format, or do they need to be converted to .jpg for use? Thank you.

Ted678Wu commented 3 years ago

+1

stephanecharette commented 3 years ago

Without OpenCV, I'm thinking it is unlikely to work.

With OpenCV, I can imagine it might work, but I have not tried it.

I do see in utils.c there is a function that looks for some common extensions, including .jpg, .jpeg, .bmp, .ppm, and .tiff. But I only ran into this while quickly browsing the code a while back, I didn't attempt to check to see what it is doing and if loading those image types is actually supported.

But running something like mogrify from ImageMagick to change the image type is trivial. Just typing this comment took more time than running it against thousands of images to convert your images to jpg or png. Why not simply convert your images if you're worried that .tiff is not supported?

Ted678Wu commented 3 years ago

@stephanecharette thanks for your reply, the reason why I want to keep tiff format is the 32bit information, don't want to lose them during the conversion from tiff to png. or do you think 32bit is not necessary? not much helpful? since later we have the image preprocessing step and maybe other step? thanks.

btw: could you give me some information about the result.txt file,

the time spent for each image is network latency or it's the end-to-end latency (including image preprocessing)? and if it's the latter, do we have some function to help me get the network latency?