Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
affective_computing
/
face_recognize_mnn
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
81c9fa1b
authored
2022-09-23 17:28:50 +0800
by
乔峰昇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update OutputInfo
1 parent
9f65ab06
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
.gitignore
facecomparison.cpp
include/facecomparison.h
main.cpp
.gitignore
View file @
81c9fa1
*.vscode
\ No newline at end of file
.vscode
build/
\ No newline at end of file
...
...
facecomparison.cpp
View file @
81c9fa1
...
...
@@ -26,7 +26,7 @@ bool FaceComparison::init_model(string face_det_model,string face_landm_model,st
}
}
int
FaceComparison
::
inference
(
string
image1_path
,
string
image2_path
,
OutputInfo
&
output_info
){
int
FaceComparison
::
inference
(
string
image1_path
,
string
image2_path
,
OutputInfo
_FaceComparison
&
output_info
){
bool
result
=
false
;
cv
::
Mat
image1
=
cv
::
imread
(
image1_path
);
cv
::
Mat
image2
=
cv
::
imread
(
image2_path
);
...
...
@@ -96,7 +96,7 @@ int FaceComparison::inference(string image1_path,string image2_path,OutputInfo &
return
result
;
}
int
FaceComparison
::
inference
(
Mat
image1
,
Mat
image2
,
OutputInfo
&
output_info
){
int
FaceComparison
::
inference
(
Mat
image1
,
Mat
image2
,
OutputInfo
_FaceComparison
&
output_info
){
if
(
image1
.
empty
()){
cout
<<
"Please check if the first picture path exists"
<<
endl
;
output_info
.
error_code
=
9001
;
...
...
include/facecomparison.h
View file @
81c9fa1
...
...
@@ -6,7 +6,7 @@
#include "retinaface.h"
#include "facelandmarks.h"
struct
OutputInfo
{
struct
OutputInfo
_FaceComparison
{
int
error_code
;
bool
result
;
};
...
...
@@ -34,8 +34,8 @@ class FaceComparison{
//接口
int
inference
(
string
image_path1
,
string
image_path2
,
OutputInfo
&
output_info
);
int
inference
(
Mat
image1
,
Mat
image2
,
OutputInfo
&
output_info
);
int
inference
(
string
image_path1
,
string
image_path2
,
OutputInfo
_FaceComparison
&
output_info
);
int
inference
(
Mat
image1
,
Mat
image2
,
OutputInfo
_FaceComparison
&
output_info
);
private
:
RetinaFace
face_det
;
...
...
main.cpp
View file @
81c9fa1
...
...
@@ -8,7 +8,7 @@ int main(){
string
face_rec_model
=
"/home/situ/qfs/sdk_project/mnn_projects/face_recognize_mnn/model/cls_face_mnn_1.0.0_v0.1.1.mnn"
;
InitModelError
init_model_code
;
OutputInfo
output_info
;
OutputInfo
_FaceComparison
output_info
;
FaceComparison
face_rec
=
FaceComparison
();
bool
init_
=
face_rec
.
init_model
(
face_det_model
,
face_landm_model
,
face_rec_model
,
init_model_code
);
if
(
init_
){
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment