CSAILVision/GazeCapture

Regarding Face Grid

Madankumar90 opened this issue · 8 comments

Hey,
May i please know what are the FrameW and FrameH arguments, are they the original frame width and height(480640) or is it the Resized value(224224).

How The faceGrid width and height values are same in json for ex. 13*13??

Thanks,
Madan

Where do you see those FrameW/H?

In faceGridFromFaceRect.m,
//
function labelFaceGrid = faceGridFromFaceRect(frameW, frameH, gridW, ...
gridH, labelFaceX, labelFaceY, labelFaceW, labelFaceH, parameterized)
//

are frameW, frameH original frame width and height of the image or are they resized values(224 x 224)??

The original Dataset of 136GB has proper images which are not 244X244 size.
I am trying to train the models to create the same Face and eye detection for the next model to detect the coordinates but have to succeeded so far.

The provided images are full captures by the camera downscaled to VGA. That is why they are not squares. appleFace.json contains bounding boxes of the faces (x,y,w,h) in PIXELS with respect to these input VGA images. Notice, that w == h i.e. square. The cropped faces are then simply rescaled to 224x224.

appleFace.json contains bounding boxes of the faces (x,y,w,h) in PIXELS with respect to these input VGA images. Notice, that w == h i.e. square. The cropped faces are then simply rescaled to 224x224.

But I don't see w == h for every frame in appleFace.json. I calculated that only about 25% of valid frames (i.e. 375,766 out of 1,490,959) have square faces.
Also, in a separate issue raised on this repo #16 (comment), it is stated that - We enlarge the detected faces to have a square shape - implying that all faces aren't square in appleFace.json
Can you please clarify the contradiction in the quoted comment above?

Thanks

@erkil1452 Could you answer the last comment made by abhikr045. It would help me a lot too.

I cannot tell. There is a 2px error in the JSON that is described in my parsing script: https://github.com/CSAILVision/GazeCapture/blob/master/pytorch/prepareDataset.py on line 103 but I do not actually check if it is or is not a square. In the training code I simply resize any image to a 224x224 square so such error would get lost. Again, this is reimplementation of the original caffe code which I think is more strict about it so it surprises me it is inconsistent.

Also sometimes the face is partially out of frame. We pad such frames with zeros during cropping but the JSON box should still be a square in such cases.