FeiYull / TensorRT-Alpha

šŸ”„šŸ”„šŸ”„TensorRT for YOLOv8态YOLOv8-Pose态YOLOv8-Seg态YOLOv8-Cls态YOLOv7态YOLOv6态YOLOv5态YOLONAS......šŸš€šŸš€šŸš€CUDA IS ALL YOU NEED.šŸŽšŸŽšŸŽ
GNU General Public License v2.0
1.28k stars 198 forks source link

The resizeimg input here is a fixed value of 114, shouldn't it be adapted based on different images #33

Closed ZJDATY closed 1 year ago

ZJDATY commented 1 year ago
void YOLOV8::preprocess(const std::vector<cv::Mat>& imgsBatch)
{
    // 1.resize
    resizeDevice(m_param.batch_size, m_input_src_device, m_param.src_w, m_param.src_h,
        m_input_resize_device, m_param.dst_w, m_param.dst_h, 114, m_dst2src);

Also, I don't quite understand the principle of how to construct utils: AffineMat matrix. Isn't the image affine transformation a 3x3 matrix with 6 unknowns. Is it possible to use a 2x2 scaling matrix. I don't quite understand the meaning of the third column of numbers, or rather, I don't quite understand this matrix.

image

image

image

FeiYull commented 1 year ago

@ZJDATY 1389269-20230119135633591-1420057710

FeiYull commented 1 year ago

https://github.com/FeiYull/TensorRT-Alpha/blob/ffa90c0218005703bb52333fd24bb81c768cf28f/utils/kernel_function.h#L49

resizeDevice has the same effect as cv::resize(), both are fixed padding values(114).