Use yuv and fix FR to use batch 4

This commit is contained in:
2026-04-22 16:01:44 +10:00
parent 24d6d2e0a5
commit fc47a42c6a
6 changed files with 65 additions and 22 deletions

View File

@@ -255,8 +255,8 @@ namespace ANSCENTER {
if (engineType == EngineType::NVIDIA_GPU) {
optimizedModelFolder = GetParentFolder(_modelFilePath);
m_options.optBatchSize = 8;
m_options.maxBatchSize = 32;
m_options.optBatchSize = 2;
m_options.maxBatchSize = 4;
m_options.engineFileDir = optimizedModelFolder;
m_options.precision = fp16 ? Precision::FP16 : Precision::FP32;

View File

@@ -124,13 +124,13 @@ float ByteTrackNCNN::Rect<T>::calcIoU(const Rect<T>& other) const
}
template<typename T>
ByteTrackNCNN::Rect<T> generate_rect_by_tlbr(const ByteTrackNCNN::Tlbr<T>& tlbr)
ByteTrackNCNN::Rect<T> ByteTrackNCNN::generate_rect_by_tlbr(const ByteTrackNCNN::Tlbr<T>& tlbr)
{
return ByteTrackNCNN::Rect<T>(tlbr[0], tlbr[1], tlbr[2] - tlbr[0], tlbr[3] - tlbr[1]);
}
template<typename T>
ByteTrackNCNN::Rect<T> generate_rect_by_xyah(const ByteTrackNCNN::Xyah<T>& xyah)
ByteTrackNCNN::Rect<T> ByteTrackNCNN::generate_rect_by_xyah(const ByteTrackNCNN::Xyah<T>& xyah)
{
const auto width = xyah[2] * xyah[3];
return ByteTrackNCNN::Rect<T>(xyah[0] - width / 2, xyah[1] - xyah[3] / 2, width, xyah[3]);