F. Yao
Created November 5, 2020 © Apache-2.0

SeniorCare

ComputerVision prediction of emotional mode of senior

AdvancedFull instructions providedOver 4 days37
SeniorCare

Things used in this project

Hardware components

Zynq UltraScale+ MPSoC ZCU104
Zynq UltraScale+ MPSoC ZCU104
×1
Camera (generic)
×1
MAX30003 Ultra-Low Power, Single-Channel Integrated Biopotential (ECG, R to R Detection) AFE
Maxim Integrated MAX30003 Ultra-Low Power, Single-Channel Integrated Biopotential (ECG, R to R Detection) AFE
×1

Software apps and online services

Vivado Design Suite
AMD Vivado Design Suite
Visual Studio 2017
Microsoft Visual Studio 2017
Vitis™ AI development environment
Anaconda Python
Pytorch

Story

Read more

Code

main.cpp

C/C++
main
/**
* @brief Entry for running pose detection neural network
*
* @arg file_name[string] - path to file for detection
*
*/
int main(int argc, char** argv) {
// Check args
if (argc != 4) {
cout << "Usage of pose detection demo: ./pose_detection [video_file] "
"[pose_model_file] [ssd_model_file]"
<< endl;
return -1;
}
// Initializations
string file_name = argv[1];
pose_model_path = argv[2];
ssd_model_path = argv[3];
cout << "Detect video: " << file_name << endl;
video.open(file_name);
if (!video.isOpened()) {
cout << "Failed to open video: " << file_name;
return -1;
}
// Run tasks
array<thread, 4> threads = {thread(Read, ref(is_reading)),
thread(runGestureDetect, ref(is_running_1)),
thread(runGestureDetect, ref(is_running_1)),
thread(Display, ref(is_displaying))};
for (int i = 0; i < 4; ++i) {
threads[i].join();
}
// Detach from DPU driver and release resources
video.release();
return 0;
}

Credits

F. Yao
18 projects • 13 followers
.
Contact

Comments

Please log in or sign up to comment.