the lonely programmer
Published © GPL3+

AI Based Safety Detection Using Deep Learning Algorithm

The deep learning algorithm is used to identify the industrial environment through artificial intelligence to ensure security.

AdvancedWork in progressOver 2 days597
AI Based Safety Detection Using Deep Learning Algorithm

Things used in this project

Hardware components

Thundercomm AI Kit
ThunderSoft Thundercomm AI Kit
×1
Mobile phone with Qualcomm Snapdragon 845
×1

Software apps and online services

Qualcomm Neural Processing SDK
Caffe
Android Studio
Android Studio

Story

Read more

Schematics

Block Diagram of CNN

Code

Face Sampling

C/C++
int main()
{
string model_path = MODEL_PATH //We should replace MODEL_PATH with routine path contains all dlc files.
FaceImage* faceImage = new FaceImage();
FaceAntiSpoofing* faceAntiSpoofing= new FaceAntiSpoofing();
faceImage ->init(model_path);  //Init a Face SDK object:
faceAntiSpoofing->load_model(model_path);  //Init a Face SDK

if(faceImage ->isInit() ) 
{ // Checking Face SDK initialization status
LOGD(Face SDK initialized failed.);
return;
}

faceImage ->setPerformance(AUTO);     //Set performance level to AUTO.
string version = faceImage ->getAlgoInfo();   //Get algorithom version
LOGD(Current Face SDK version is %s, version.c_str() ); //Print current version number.
imgBuf image_input = rdc::cvt_Mat2ImgBuf(image_cv); //image_cv is a cv::Mat type image buffer which gets by user
FaceInfo faceInfo = faceImage ->run(image_input, FACE_COF_DETECT); //Here is the main difference between FaceVideo and FaceImage.
Rect rect_face = faceInfo.getFaceRect(); // rect_face is the rectangle we wanted.
faceAntiSpoofing->setStrict(false);
faceAntiSpoofing->setActionsRandom(true);
int status = faceAntiSpoofing->detect(image_input, rect_face);
}

Repo

Credits

the lonely programmer

the lonely programmer

17 projects • 89 followers
I'm good at programming PIC, ARM Cortex controllers. Currently trying to master RPi.

Comments