Ask Your Question
0

Fisherfaces gender detection opencv - i am able to run the source code given using AT & T database set of data. but how do i detect the gender from the resultant i.e images.?

asked 2017-05-04 04:19:50 -0600

PankajPS gravatar image

Fisherfaces gender detection opencv - i am able to run the source code given using AT & T database set of data. but how do i detect the gender from the resultant i.e images.In output folder the images are getting generated but how do classify the gender ??? also how do i setup my own data images rather than using AT and yale database?? Please help me

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-04 04:48:33 -0600

berak gravatar image

updated 2017-05-04 04:54:25 -0600

by default, the system is setup for identification (retrieve the classid of closest train image).

if you want to use it for age or gender recognition, you'll have to relabel your train data, i.e. [0 1] labels for gender.

if you're using csv files for this, you'll have to change it, assuming 0 is male and 1 is female:

at/s13/2.pgm;0
at/s13/7.pgm;0
at/s13/6.pgm;0
[...]
at/s17/5.pgm;0
at/s17/3.pgm;0
[...]
at/s8/1.pgm;1
at/s8/2.pgm;1
at/s8/3.pgm;1
[...]
at/s10/1.pgm;1

ofc. you can use your own images, just add a line with the image path, a semicolon, and the gender id.

then, you'll have to re-train it using this data, and it will predict 0 or 1 labels later, instead of person-id's.

edit flag offensive delete link more

Comments

Thanks berak.. i understood but my query.is here v r manually assigning the gender in csv like 0 or 1 but how the system can detect the gender without assigning 0 or 1. like in video v get male or female the same way without assigning any value 0 or 1 manually. suggest me how do i perform tat

PankajPS gravatar imagePankajPS ( 2017-05-04 06:19:37 -0600 )edit

well, obviously, before your system can predict gender automatically, you have to train it on manually labelled data.

berak gravatar imageberak ( 2017-05-04 06:27:05 -0600 )edit

Then if tat is the case means in video how does it detect the gender automatically when we will be on cam. then why cant we get from the images like video

PankajPS gravatar imagePankajPS ( 2017-05-04 06:36:52 -0600 )edit

sorry, but i do not understand your point. can you try again ?

berak gravatar imageberak ( 2017-05-04 06:59:47 -0600 )edit

For gender detection ,with the current implementation i need to specify 0 and 1 for gender in the CSV file ryt. so i need to detect the gender without specifying the value 0 or 1 for images which is the manual process. i have seen in some of the video references in which the gender is being detected from the videos like live webcam of our machine. once webcam get on it reflects the gender after detecting the faces it result easily male and female. so like wise cant we detect the same from images. Hope you understood berak.

PankajPS gravatar imagePankajPS ( 2017-05-04 07:46:38 -0600 )edit

well, after you trained it, it will be able to detect gender automatically (from video or images, does not matter)

but you do underestand, that you have to train it first ? (and that you need labelled data for that part ?)

berak gravatar imageberak ( 2017-05-04 07:51:38 -0600 )edit

so you mean whatever dataset we have we need to label it first ,then only system recognize the gender. it doesn't matter whether its video or image ryt.

PankajPS gravatar imagePankajPS ( 2017-05-04 08:55:16 -0600 )edit

yea, exactly (that's why this is called supervised machinelearning). how did you expect, it would work otherwise ?

berak gravatar imageberak ( 2017-05-04 09:13:57 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-05-04 04:19:50 -0600

Seen: 458 times

Last updated: May 04 '17