File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,6 +181,8 @@ bool CarsCounting::InitDetector(cv::UMat frame)
181181 config.emplace (" nmsThreshold" , " 0.4" );
182182 config.emplace (" swapRB" , " 0" );
183183 config.emplace (" maxCropRatio" , " -1" );
184+ if (m_batchSize > 1 )
185+ config.emplace (" maxBatch" , std::to_string (m_batchSize));
184186
185187 config.emplace (" white_list" , std::to_string ((objtype_t )ObjectTypes::obj_person));
186188 config.emplace (" white_list" , std::to_string ((objtype_t )ObjectTypes::obj_car));
Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ class YoloDarknetExample final : public VideoExample
637637 }
638638 if (maxBatch < m_batchSize)
639639 maxBatch = m_batchSize;
640- config.emplace (" maxBatch" , std::to_string (m_batchSize ));
640+ config.emplace (" maxBatch" , std::to_string (maxBatch ));
641641 config.emplace (" classNames" , pathToModel + " coco.names" );
642642 config.emplace (" maxCropRatio" , " -1" );
643643 }
@@ -901,7 +901,7 @@ class YoloTensorRTExample final : public VideoExample
901901 }
902902 if (maxBatch < m_batchSize)
903903 maxBatch = m_batchSize;
904- config.emplace (" maxBatch" , std::to_string (m_batchSize ));
904+ config.emplace (" maxBatch" , std::to_string (maxBatch ));
905905 config.emplace (" classNames" , pathToModel + " coco.names" );
906906 }
907907 else
You can’t perform that action at this time.
0 commit comments