Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Windows compiler warnings #287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/facedetectcnn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,8 +871,8 @@ bool detection_output(const CDataBlob<float> * priorbox,
float cls_score = pConf[i + 1];
int face_idx = i / 2;
float iou_score = pIoU[face_idx];
float conf = sqrtf(cls_score * iou_score);
if(conf > confidence_threshold)
float confidence = sqrtf(cls_score * iou_score);
if(confidence > confidence_threshold)
{
float fBox_x1 = pPriorBox[face_idx * 4];
float fBox_y1 = pPriorBox[face_idx * 4 + 1];
Expand Down Expand Up @@ -920,7 +920,7 @@ bool detection_output(const CDataBlob<float> * priorbox,
bb.lm[i * 2 + 1] = lmy;
}

score_bbox_vec.push_back(std::make_pair(conf, bb));
score_bbox_vec.push_back(std::make_pair(confidence, bb));
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/facedetectcnn.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ class CDataBlob
//#endif
for (int r = 0; r < this->height; r++)
{
for (int c = 0; c < this->width; c++)
for (int col = 0; col < this->width; col++)
{
int pixel_end = this->channelStep / sizeof(T);
T * pI = (this->data + (size_t(r) * this->width + c) * this->channelStep /sizeof(T));
T * pI = (this->data + (size_t(r) * this->width + col) * this->channelStep /sizeof(T));
for (int ch = this->channels; ch < pixel_end; ch++)
pI[ch] = 0;
}
Expand All @@ -218,7 +218,7 @@ class CDataBlob
return true;
}

bool setInt8FilterData(signed char * pData, int bias, int dataWidth, int dataHeight, int dataChannels)
bool setInt8FilterData(signed char * pData, int dataBias, int dataWidth, int dataHeight, int dataChannels)
{
if (pData == NULL)
{
Expand Down Expand Up @@ -250,7 +250,7 @@ class CDataBlob
}
}

this->bias = bias;
this->bias = dataBias;
return true;
}

Expand Down