yasenh / libtorch-yolov5

A LibTorch inference implementation of the yolov5
MIT License
372 stars 114 forks source link

如何能使用 224X的图 #8

Closed lulersoft closed 3 years ago

lulersoft commented 3 years ago

尝试修改 std::vector pad_info = LetterboxImage(img_input, img_input, cv::Size(640, 640)); 为std::vector pad_info = LetterboxImage(img_input, img_input, cv::Size(224, 224)); 出现问题。

yasenh commented 3 years ago

Hi @lulersoft, for smaller image you can still use 640 as padding size, this is what original yolov5 implemented: https://github.com/ultralytics/yolov5/blob/master/utils/datasets.py#L137, and theoretically you should able to change padding size as well, I will check it out later on. Thanks for your feedback.