nwesem / mtcnn_facenet_cpp_tensorRT

Face Recognition on NVIDIA Jetson (Nano) using TensorRT
GNU General Public License v3.0
200 stars 72 forks source link

Video file test #29

Open hirwa145 opened 3 years ago

hirwa145 commented 3 years ago

Is there a way i can use video file as input instead of image/photo.

jishang1602 commented 3 years ago

yes

hirwa145 commented 3 years ago

how can i deploy it using deepstream?

jishang1602 commented 3 years ago

how can i deploy it using deepstream? --> Not yet build.

Is there a way i can use video file as input instead of image/photo.? --> in main.cpp changing the 45th line from 0 to video.mp4

  1. // init opencv stuff
  2. VideoStreamer videoStreamer = VideoStreamer("video.mp4", videoFrameWidth, videoFrameHeight);
  3. cv::Mat frame;

I hope i answered your query. Thanks

hirwa145 commented 3 years ago

Thank you. I really appreciate your help and time.

hirwa145 commented 3 years ago

I tried the solution you provided for using mp4 vido file as input. But i am getting errors

jishang1602 commented 3 years ago

Can you please share the error

hirwa145 commented 3 years ago

End generating TensorRT runtime models Parsing Directory: ../imgs Empty frame! Exiting... Try restarting nvargus-daemon by doing: sudo systemctl restart nvargus-daemon Counted 0 frames in 0 seconds! This equals nanfps.

hirwa145 commented 3 years ago

After performing this command /mtcnn_facenet_cpp_tensorRT I didsudo systemctl restart nvargus-daemon` but i am still getting that error, what could be the reason?

I am not trying to compare from camera, just using mp4 video as input test

jishang1602 commented 3 years ago

Did you put your database in the imgs folder? Also need to resize the video file to 640x480 size. Please do this changes and tell me the results

hirwa145 commented 3 years ago

"Did you put your database in the imgs folder", you mean the image of known person to recognise in the video?

jishang1602 commented 3 years ago

Yes the image database that you want to recognise in the video

jishang1602 commented 3 years ago

This folder contains images of people you would like to recognize. The format of picture should class_name.jpg.

hirwa145 commented 3 years ago

is it possible to use 1080x1920? by setting this to

34 int videoFrameWidth = 1080; 35 int videoFrameHeight = 1920

hirwa145 commented 3 years ago

Thank you, i managed to load the video successfully, even tho it is showing new person on the face of a person whose face is included in the imgs file

hirwa145 commented 3 years ago

Whilest doing the test, i realised that smaller faces are not detected, is there a way to solve this?

jishang1602 commented 3 years ago

40 is the minimum pixel size for face detection. You can reduce it. But normally people are taking the smaller size upto 40 pixels

hirwa145 commented 3 years ago

how can i change the pixel size? i mtcnn.cpp

//set minimal face size (weidth in pixels) nt minsize = 60; this side? and set it to lower size?