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

how do you get mobilefacenet feature? #1

Open
Linxincode opened this issue May 16, 2018 · 4 comments
Open

how do you get mobilefacenet feature? #1

Linxincode opened this issue May 16, 2018 · 4 comments

Comments

@Linxincode
Copy link

hi,I got some problems when i get feature. could you tell me how you get it?

@honghuCode
Copy link
Owner

float* getFeatByMobileFaceNetNCNN(ncnn::Extractor ex, cv::Mat img)
{
//cout << "getFeatByMobileFaceNetNCNN" << endl;
float *feat = new float[128];
ncnn::Mat in = ncnn::Mat::from_pixels_resize(img.data, ncnn::Mat::PIXEL_BGR, img.cols, img.rows, 112, 112);
ex.input("data", in);
ncnn::Mat out;
ex.extract("fc1", out);
std::vector cls_scores;

for (int j = 0; j<out.w; j++)
{
	feat[j] = out[j];
}
return feat;

}

in my project,i use ncnn_mobilefaceNet.lib to get mobilefacenet feature

@ForestWang
Copy link

Hi honghu:
For the code "getFeatByMobileFaceNetNCNN" you replyed, is there some preprocess, i mean substract the mean value and norm?
thanks very much.

@sunjunlishi
Copy link

@honghuCode 真棒,这个 效果真是不错;

@sunjunlishi
Copy link

Where does your model come from? Does it have a corresponding Caffe network structure?

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

No branches or pull requests

4 participants