Skip to content

Commit

Permalink
fix the performance of yolov5-v3.0 enazoe#74
Browse files Browse the repository at this point in the history
  • Loading branch information
enazoe committed Oct 28, 2020
1 parent d6967f6 commit bb25081
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions configs/yolov5-3.0/yolov5l.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
width=640
height=320
channels=3
batch=1
nc=80
depth_multiple=1.0
width_multiple=1.0
Expand Down
2 changes: 1 addition & 1 deletion modules/trt_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ nvinfer1::ILayer * layer_bottleneck_csp(std::vector<nvinfer1::Weights> &trtWeigh
concatInputs[1] = cv2->getOutput(0);
auto cat = layer_concate(concatInputs, 2, 0,network_);
auto bn = layer_bn(trtWeights_, s_model_name_, map_wts_, cat->getOutput(0), 2 * c_, network_);
auto act = layer_act(bn->getOutput(0), network_);
auto act = layer_act(bn->getOutput(0), network_,"leaky");
//cv4
auto cv4 = layer_conv_bn_act(trtWeights_, s_model_name_ + ".cv4", map_wts_, act->getOutput(0), network_, c2_, 1);
return cv4;
Expand Down
2 changes: 1 addition & 1 deletion modules/yolo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ void Yolo::create_engine_yolov5(const nvinfer1::DataType dataType,
}
std::vector<std::string> vec_args = parse_str_list(m_configBlocks[i]["args"]);
std::string s_model_name = "model." + std::to_string(i - 1);
for (size_t ind_from = 0; ind_from < vec_from.size(); ++ind_from)
for (size_t ind_from = 0; ind_from < vec_from.size(); ++ind_from)
{
int n_filters = (5 + _n_classes) * 3;
int from = vec_from[ind_from];
Expand Down

0 comments on commit bb25081

Please sign in to comment.