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

Hero 8 Black FACE definition #163

Open
stevenh opened this issue Jul 5, 2022 · 6 comments
Open

Hero 8 Black FACE definition #163

stevenh opened this issue Jul 5, 2022 · 6 comments

Comments

@stevenh
Copy link

stevenh commented Jul 5, 2022

The README specifies the definition of FACE Hero 6 and Hero 7 but Hero 8 seems to be a third variant with the complex type definition of Lffffff.

Could you document what this type is defined as, specifically the additional 2 fields?

@dnewman-gpsw
Copy link
Collaborator

Ooops, yes missing from the readme, now updated. HERO8 has the third version, and HERO10 the forth, it has been hard to keep this consistant.

HERO8/9 - The last two fields are confidence (percentage likelihood of the face detection) and smile percentage (confidence of a smile).

@stevenh
Copy link
Author

stevenh commented Jul 7, 2022

Thanks @dnewman-gpsw could you confirm the definition for Hero9, I'm guessing BLffffff ?

Also do you have a sample file for hero9 and hero10 as they would be great for testing against.

@dnewman-gpsw
Copy link
Collaborator

HERO9 is the same as 8 (Lffffff). Providing sample HERO9/10 clips in now on my todo list.

@stevenh
Copy link
Author

stevenh commented Jul 8, 2022

Sorry @dnewman-gpsw I'm confused, based on your update hero 8 is defined as:
struct ID,x,y,w,h,confidence %,smile %

Which corresponds to the fields:

ID: L
x, y, w, h: f,f,f,f
confidence %: f
smile %: f

Where as hero 9 is defined as:
struct ver,ID,x,y,w,h,confidence %,smile %

Based on that it seems it has an extra ver field at the beginning so if it was defined as the same as hero 8 Lffffff it would be missing a field definition for ver. Did I misunderstand?

@dnewman-gpsw
Copy link
Collaborator

Sorry, I made an error on the readme. That is for HERO10, not HERO9. HERO9 and HERO8 have the same FACE metadata. HERO10 uses the more compact "BBSSSSSBB", switching from floats to unsigned shorts or bytes (28 bytes down to 14 bytes per FACE). It also adds a blink detector.

struct face_data {
byte version; //4
byte confidence; //0-100
uint16_t face_id;
uint16_t face_x; //0-65535
uint16_t face_y; //0-65535
uint16_t face_w; //0-65535
uint16_t face_h; //0-65535
byte smile_percent; //0-100
byte blink_percent; //0-100
};

Example:
"STRM": {
"STMP": 2039432,
"TSMP": 45,
"STNM": "Face Coordinates and details",
"TYPE": "BBSSSSSBB",
"SCAL": [1, 1, 1, 65535, 65535, 65535, 65535, 1, 1],
"FACE": [4,52,0,10376,17991,19011,39563,0,98],
"FACE": [4,99,1,17322,11438,16759,36135,0,99],
"FACE": [4,87,1,18841,11954,14813,36529,0,94],
"FACE": [4,97,1,19199,12591,14762,35953,0,92],
"FACE": [4,99,1,21469,12924,12748,35953,0,90],
"FACE": [4,99,1,21503,13076,15854,36377,0,92],
"FACE": [4,99,1,23807,12864,15786,36590,0,95],
}

@stevenh
Copy link
Author

stevenh commented Jul 8, 2022

Awesome thanks @dnewman-gpsw!

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

2 participants