AI components

Step1: Choose AI components

Oops!, No Image to display.

Component List

  1. Face Recognition
  2. Object Detection
  3. Pose Estimation
  4. Face Detection
  5. Image Classification
  6. Segmentation

1. Face Recognition

Description

Face Recognition component enables you to register a human face in the database and recognition of faces. Multiple APIs are given to user to make it flexible to create applications.

Configuration

APIs List

Oops!, No Image to display.

Face Recognition API

Face Detection API

APIDescription
detectFace()detects faces from given frame.

Face Recognition API

APIDescription
alignFace()aligns the face with the FaceInfo given by detectFace API.
getEmbeddings()Returns embeddings for frame which is 128-D vector
sameFace()returns 1 if two images belong to same person.

Database API

APIDescription
storeFace()store face-embeddings to database.
findFace()find face from database.
db_flush()flushes the database entries.

Face Detection API

detectFace()

Description : Detects a face and returns the FaceInfo for each face includes : Confidence score, X,Y Co-ordinates for Face rectangle, area, landmarks etc.

Return-type : vector<FaceInfo> . FaceInfo is a structure which declaration is given in shunyaface.h.

typedef struct FaceInfo {
float score;
int x[2];
int y[2];
float area;
float regreCoord[4];
int landmark[10];
} FaceInfo;

Usage :

Define the structure given above.
#include<ai/shunyaface.h>
cv::Mat frame;
vector<FaceInfo>faces = detectFace(frame); //call detectFace function
//the frame above given is raw frame and not MTCNN cropped frame.

Face Recogntion API

alignFace()

Description : aligns the face with the FaceInfo given by detectFace API, face is aligned and cropped.

Return-type : cv::Mat

Usage:

FaceInfo faces;
cv::Mat alignedFrame = alignFace(frame,FaceInfo faces[0]); //call face_features using facerec instance
//the frame above given MTCNN cropped frame.

getEmbeddings()

Description : returns vector of 128-D having unique face information.

Return-type : vector<float>

Usage :

vector<float> features;
embedding = getEmbeddings(alignedFrame); //call getEmbeddings function

sameFace()

Description : checks whether two face embeddings belong to same person or not

Return-type : int

Returns :

returns 1 , if two frames belong to same person
returns 0, if two frames doesn't belong to same person

Usage :

int val;
val = sameFace(embedding1, embedding2); //call sameFace() function

Database API

storeFace()

Description : stores facial embeddings to database with name tag

Return-type : int - 1 on success on error code exists by giving an error message.

Usage :

num = storeFace(embeddings,name,"dbfile.txt"); //call storeFace() function

findFace()

Description: find name of face from the database

Return-type: string

Returns : returns name for the person if found in the database or returns "NULL" if no face is found.

Usage:

string name;
name = findFace(frame,"dbfile.txt"); // call findFace function

dbFlush()

Description : flushes the database entries

Return-type: returns 1 on success

usage :

int val = dbFlush(dbfilename); //call dbflush() function

2. Object Detection

Oops!, No Image to display.

Description

Object detection model is trained on 20 objects which are as follows.

"aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair",
"cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant",
"sheep", "sofa", "train", "tvmonitor"

Configuration

APIs List


3. Pose Estimation

Oops!, No Image to display.

Description

Configuration

APIs List


4. Face Detection

Oops!, No Image to display.

Description

This is one of the faster face detection application which can detect maximum (need to be specific) face in less time.

Configuration

APIs List


5. Image Classification

Oops!, No Image to display.

Results

281 = 0.700896 == cat
282 = 0.156584
285 = 0.142381

Description

Image classification model is trained on imagenet dataset with 1000 classes.

Configuration

APIs List


6. Segmentation

Oops!, No Image to display.

Description

Segmentation model is trained on 80 objects which includes

"person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant",
"stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra", "giraffe",
"backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball", "kite", "baseball bat",
"baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl",
"banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "couch",
"potted plant", "bed", "dining table", "toilet", "tv", "laptop", "mouse", "remote", "keyboard", "cell phone", "microwave", "oven",
"toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear", "hair drier", "toothbrush"

Configuration

APIs List