mobileFacenet-ncnn icon indicating copy to clipboard operation
mobileFacenet-ncnn copied to clipboard

how do you get mobilefacenet feature?

Open Linxincode opened this issue 7 years ago • 4 comments

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

Linxincode avatar May 16 '18 02:05 Linxincode

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

honghuCode avatar May 16 '18 03:05 honghuCode

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

ForestWang avatar Jul 09 '18 09:07 ForestWang

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

sunjunlishi avatar Sep 19 '18 09:09 sunjunlishi

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

sunjunlishi avatar Sep 21 '18 09:09 sunjunlishi