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

add mobilenet ssd example #156

Merged
merged 1 commit into from
Oct 10, 2017
Merged

add mobilenet ssd example #156

merged 1 commit into from
Oct 10, 2017

Conversation

lzx1413
Copy link
Contributor

@lzx1413 lzx1413 commented Oct 9, 2017

No description provided.

@lzx1413 lzx1413 closed this Oct 9, 2017
@lzx1413 lzx1413 reopened this Oct 9, 2017

ncnn::Mat out;

for(int i=0;i<1;i++)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this loop is useless

Object object;
for(int iw=0;iw<out.w;iw++)
{
auto value = out.data[iw+ih*out.w];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out.w is always six, so it's fine to write const float* values = out.row(ih); and use values[0] values[1] .... instead of the following six conditions
do not use auto keyword

printf("\n");

}
for(auto object : objects)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always prefer indexed for-loop over c++11 range-based for

int img_w = raw_img.size().width;
mobilenet.load_param("mobilenet_ssd_voc_ncnn.param");
mobilenet.load_model("mobilenet_ssd_voc_ncnn.bin");
auto input_size = 300;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no c++11 auto here

{
Object object = objects.at(i);
if(object.prob > show_threshold)
cv::rectangle(raw_img,object.rec,cv::Scalar(255,0,0));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be nice to have class-id and score text drawn besides rectangle only

@@ -25,13 +25,13 @@ Interp::Interp()

Interp::~Interp()
{
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interp.cpp file conflicts, please fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants