Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web cam #3

Open
aliraza1616 opened this issue Oct 12, 2018 · 14 comments
Open

Web cam #3

aliraza1616 opened this issue Oct 12, 2018 · 14 comments

Comments

@aliraza1616
Copy link

HI. i have checked Your code and its working fine on still. When i ran the model of Webcam, it always displayed man and women as man. can you please provide some help?

@aliraza1616
Copy link
Author

also if we want it to count the faces, how can we do it?

@arunponnusamy
Copy link
Owner

Hello @aliraza1616 , In this repository I have demonstrated how to train a neural network from scratch (without using transfer learning / fine tuning pre-trained model weights) for a task like 'gender detection'. The accuracy of the detection will be low mostly due to

  1. very small training dataset and
  2. shallow / lightweight network architecture (in this case SmallerVGGNet).

I am working on building more accurate gender detector. I will be adding it to cvlib in the next release. Keep on eye on the blog for new posts.

Regarding counting faces, you can just keep a counting variable inside the loop and keep incrementing them whenever a face is detected and the control comes inside the loop.

@aliraza1616
Copy link
Author

aliraza1616 commented Oct 13, 2018 via email

@aliraza1616
Copy link
Author

aliraza1616 commented Oct 18, 2018 via email

@arunponnusamy
Copy link
Owner

Hello @aliraza1616 , you can replace the zero in VideoCapture(0) with path to video file name to work with video input. VideoCapture('video_input.mp4')

webcam = cv2.VideoCapture(0)

@aliraza1616
Copy link
Author

aliraza1616 commented Oct 20, 2018 via email

@aliraza1616
Copy link
Author

aliraza1616 commented Oct 21, 2018 via email

@arunponnusamy
Copy link
Owner

Can you attach the image please ?

Regarding face count, as I have mentioned earlier, you can just keep a counting variable inside the loop and keep incrementing them whenever a face is detected and the control comes inside the loop.

If you are new to Python, I would suggest to go through some introductory material on realpython or codecademy.

@aliraza1616
Copy link
Author

aliraza1616 commented Oct 22, 2018 via email

@arunponnusamy
Copy link
Owner

Can you visit the current issue on github and attach the image ? replying to email directly with image doesn't actually help.

@nyck33
Copy link

nyck33 commented Sep 9, 2019

@arunponnusamy thanks for a great contribution.
do you think it's worth the time to use your model for transfer learning or do you think I should just start with a deeper Resnet or VGG16?

@arunponnusamy
Copy link
Owner

Hey @nyck33, If you are using ResNet / VGG16 I would suggest to start with ImageNet weights for transfer learning.

@nyck33
Copy link

nyck33 commented Sep 11, 2019

@arunponnusamy Thanks for the reply and I'm very sorry for the bomb of questions.
That''s a great idea but I'm also looking at VGGFace right now to use as the 'backbone'?

@arunponnusamy
Copy link
Owner

I haven't worked much with VGGFace but I guess you can do that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants