Skip to content

Commit

Permalink
fix(FaceBoxesV2): fixed FaceBoxesV2 video detect error (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
DefTruth committed Mar 25, 2022
1 parent 22b5ed1 commit 7592184
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions lite/mnn/cv/mnn_faceboxesv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ void MNNFaceBoxesV2::detect(const cv::Mat &mat, std::vector<types::Boxf> &detect
void MNNFaceBoxesV2::generate_anchors(const int target_height, const int target_width,
std::vector<FaceBoxesAnchorV2> &anchors)
{
if (anchors_is_already_generated) return;

std::vector<std::vector<int>> feature_maps;
for (auto step: steps)
{
Expand Down Expand Up @@ -131,8 +129,6 @@ void MNNFaceBoxesV2::generate_anchors(const int target_height, const int target_
}
}
}

anchors_is_already_generated = true;
}

void MNNFaceBoxesV2::generate_bboxes(std::vector<types::Boxf> &bbox_collection,
Expand Down
1 change: 0 additions & 1 deletion lite/mnn/cv/mnn_faceboxesv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ namespace mnncv
{256},
{512}
};
bool anchors_is_already_generated = false;

enum NMS
{
Expand Down
4 changes: 0 additions & 4 deletions lite/ncnn/cv/ncnn_faceboxesv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ void NCNNFaceBoxesV2::detect(const cv::Mat &mat, std::vector<types::Boxf> &detec
void NCNNFaceBoxesV2::generate_anchors(const int target_height, const int target_width,
std::vector<FaceBoxesAnchorV2> &anchors)
{
if (anchors_is_already_generated) return;

std::vector<std::vector<int>> feature_maps;
for (auto step: steps)
{
Expand Down Expand Up @@ -125,8 +123,6 @@ void NCNNFaceBoxesV2::generate_anchors(const int target_height, const int target
}
}
}

anchors_is_already_generated = true;
}

void NCNNFaceBoxesV2::generate_bboxes(std::vector<types::Boxf> &bbox_collection,
Expand Down
1 change: 0 additions & 1 deletion lite/ncnn/cv/ncnn_faceboxesv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ namespace ncnncv
{256},
{512}
};
bool anchors_is_already_generated = false;

enum NMS
{
Expand Down
3 changes: 0 additions & 3 deletions lite/ort/cv/faceboxesv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ void FaceBoxesV2::generate_anchors(const int target_height,
const int target_width,
std::vector<FaceBoxesAnchorV2> &anchors)
{
if (anchors_is_already_generated) return;

std::vector<std::vector<int>> feature_maps;
for (auto step: steps)
{
Expand Down Expand Up @@ -121,7 +119,6 @@ void FaceBoxesV2::generate_anchors(const int target_height,
}
}

anchors_is_already_generated = true;
}


Expand Down
1 change: 0 additions & 1 deletion lite/ort/cv/faceboxesv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ namespace ortcv
{256},
{512}
};
bool anchors_is_already_generated = false;

enum NMS
{
Expand Down
4 changes: 0 additions & 4 deletions lite/tnn/cv/tnn_faceboxesv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ void TNNFaceBoxesV2::detect(const cv::Mat &mat, std::vector<types::Boxf> &detect
void TNNFaceBoxesV2::generate_anchors(const int target_height, const int target_width,
std::vector<FaceBoxesAnchorV2> &anchors)
{
if (anchors_is_already_generated) return;

std::vector<std::vector<int>> feature_maps;
for (auto step: steps)
{
Expand Down Expand Up @@ -148,8 +146,6 @@ void TNNFaceBoxesV2::generate_anchors(const int target_height, const int target_
}
}
}

anchors_is_already_generated = true;
}

void TNNFaceBoxesV2::generate_bboxes(std::vector<types::Boxf> &bbox_collection,
Expand Down
1 change: 0 additions & 1 deletion lite/tnn/cv/tnn_faceboxesv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ namespace tnncv
{256},
{512}
};
bool anchors_is_already_generated = false;

enum NMS
{
Expand Down

0 comments on commit 7592184

Please sign in to comment.