DarkMark  v1.10.2-1
Image markup for darknet machine learning.
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!
Rotate and Flip

DarkMark has options to both rotate and flip images. DarkMark also ensures all the annotations are rotated and flipped.

If the dataset is MSCOCO-style keypoints, where the "left" annotations are odd numbers and "right" annotations are even numbers, then make sure to toggle that checkbox when flipping horizontally. This way, DarkMark will automatically modify the "left" and "right" annotation index numbers as the images are flipped.

Duplicates

It is important to remember that there is significant overlap between image rotation and image flip. For example, if you perform a horizontal flip + rotate 90°, this is equivalent to a vertical flip + rotate 270°. This image shows the various combinations of flips and rotations:

Note how every image in the last row matches an image in the middle row. To prevent having duplicate images in your data set, you may want to ensure you include just horizontal flips, or vertical flips, but not both.

Filenames

DarkMark doesn't have a database to store the origin of each image. Instead, it uses simple text suffixes in the filenames to determine if an image is the result of a rotation or a flip. Examples:

image description
dog.jpg original image
dog_r090.jpg 90° rotation
dog_r180.jpg 180° rotation
dog_fh.jpg horizontal flip
dog_fv.jpg vertical flip
dog_r270_fh.jpg 270° rotation and horizontal flip

What this means is the order in which you apply flip + rotate or rotate + flip can result in duplicate images in your data set. For example:

  • dog_fh_r180.jpg
  • dog_r180_fh.jpg

To DarkMark, these two files appear to be different since the names don't match.