fix letterbox_image in yolo example (#2911)

pull/2918/head
Adrià Arrufat 8 months ago committed by GitHub
parent 85aa29a4e8
commit 631c47c7fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -395,7 +395,6 @@ try
dlib::rand rnd(time(nullptr) + seed);
matrix<rgb_pixel> image, rotated;
std::pair<matrix<rgb_pixel>, std::vector<yolo_rect>> temp;
temp.first.set_size(image_size, image_size);
random_cropper cropper;
cropper.set_seed(time(nullptr) + seed);
cropper.set_chip_dims(image_size, image_size);
@ -424,6 +423,7 @@ try
for (auto& box : temp.second)
box.rect = tform(box.rect);
temp.first.set_size(image_size, image_size);
tform = letterbox_image(rotated, temp.first);
for (auto& box : temp.second)
box.rect = tform(box.rect);

Loading…
Cancel
Save