Yolo_mark icon indicating copy to clipboard operation
Yolo_mark copied to clipboard

Orientation makes bbox position mistake

Open WilliamKyle opened this issue 5 years ago • 0 comments

Orientation infomation is store in the exif section in the photo, which tell the image viewer to rotate the photo show like the same direction as you see in the phone(like 2448x3264), but the jpg file is actually store as 3264x2448.

Here is a phone test_image.jpg taken by my iPhone, the Orientation info below is Rotate 90 CW

exiftool test_image.jpg

ExifTool Version Number         : 11.11
File Name                       : test_image.jpg
Directory                       : .
File Size                       : 1222 kB
File Modification Date/Time     : 2018:12:13 12:13:45+08:00
File Access Date/Time           : 2018:12:13 12:13:59+08:00
File Inode Change Date/Time     : 2018:12:13 13:48:39+08:00
File Permissions                : rw-rw-r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 72
Y Resolution                    : 72
Exif Byte Order                 : Big-endian (Motorola, MM)
Orientation                     : Rotate 90 CW
Color Space                     : sRGB
Exif Image Width                : 3264
Exif Image Height               : 2448
Current IPTC Digest             : d41d8cd98f00b204e9800998ecf8427e
IPTC Digest                     : d41d8cd98f00b204e9800998ecf8427e
Image Width                     : 3264
Image Height                    : 2448
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 3264x2448
Megapixels                      : 8.0

Yolo_mark show the photo 2448x3264 direction, which makes bbox not the right position in the jpg file actually is. The darknet read image with not process orientation info which will make the train result not expected.

imread with IMREAD_IGNORE_ORIENTATION will not rotate the image, but it's only works in opencv 3.2 and later

WilliamKyle avatar Dec 13 '18 06:12 WilliamKyle