mtcnn_facenet_cpp_tensorRT icon indicating copy to clipboard operation
mtcnn_facenet_cpp_tensorRT copied to clipboard

Video file test

Open hirwa145 opened this issue 4 years ago • 17 comments

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

hirwa145 avatar Jan 13 '21 03:01 hirwa145

yes

jishang1602 avatar Jan 21 '21 06:01 jishang1602

how can i deploy it using deepstream?

hirwa145 avatar Jan 21 '21 23:01 hirwa145

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

jishang1602 avatar Jan 22 '21 12:01 jishang1602

Thank you. I really appreciate your help and time.

hirwa145 avatar Jan 22 '21 23:01 hirwa145

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

hirwa145 avatar Feb 04 '21 06:02 hirwa145

Can you please share the error

jishang1602 avatar Feb 04 '21 07:02 jishang1602

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 avatar Feb 04 '21 11:02 hirwa145

After performing this command /mtcnn_facenet_cpp_tensorRT I did sudo 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

hirwa145 avatar Feb 04 '21 11:02 hirwa145

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

jishang1602 avatar Feb 04 '21 12:02 jishang1602

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

hirwa145 avatar Feb 04 '21 13:02 hirwa145

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

jishang1602 avatar Feb 04 '21 13:02 jishang1602

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

jishang1602 avatar Feb 04 '21 13:02 jishang1602

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

34 int videoFrameWidth = 1080; 35 int videoFrameHeight = 1920

hirwa145 avatar Feb 04 '21 14:02 hirwa145

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 avatar Feb 04 '21 14:02 hirwa145

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

hirwa145 avatar Feb 04 '21 16:02 hirwa145

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

jishang1602 avatar Feb 04 '21 16:02 jishang1602

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?

hirwa145 avatar Feb 04 '21 16:02 hirwa145