Add verbose logging to place, slice and extract commands (fix #4)
I changed the format of boxes to (X0, Y0: WxH)
-- I think it might be a bit confusing that we're using left top corner and not the center (as in YOLO-style annotations) but as long as we know it, it's probably ok. I also added tests and implemented logging for slice
subcommand, it looks like this:
Slice
- source dir: /home/vkuznetsov/Documents/ad-detect/data/ad-versarial-test/combined/
- target dir: /home/vkuznetsov/Documents/ad-detect/data/ad-versarial-sliced/
- slicing step: 50 pixels
- include regions that overlap the slice by at least 50%
cnn.png (1919x1013)
slice (0, 0: 1919x1013)
- region (459, 63: 1004x242) type 0
- saved as cnn-0.png
cnn2.png (1919x1013)
slice (0, 0: 1919x1013)
- region (583, 8: 759x95) type 0
- region (1220, 660: 312x288) type 0
- saved as cnn2-0.png
foxnews.png (1919x1013)
slice (0, 0: 1919x1013)
- region (459, 117: 1004x243) type 0
- region (1385, 401: 278x146) type 0
- region (1369, 575: 313x242) type 0
- saved as foxnews-0.png
foxnews2.png (1919x1013)
slice (0, 0: 1919x1013)
- region (583, 134: 756x88) type 0
- region (1283, 564: 315x244) type 0
- region (862, 968: 313x45) type 0
- saved as foxnews2-0.png
huffingtonpost.png (1919x1013)
slice (0, 0: 1919x1013)
- region (580, 567: 760x107) type 0
- region (1292, 695: 318x265) type 0
- saved as huffingtonpost-0.png