hugochan / Eye-Tracker

Implemented and improved the iTracker model proposed in the paper "Eye Tracking for Everyone"
BSD 3-Clause "New" or "Revised" License
223 stars 51 forks source link

What is train_y and val_y in dataset? #15

Closed IvanKwokKC closed 3 years ago

IvanKwokKC commented 5 years ago

I expect both train_y and val_y are the 2D coordination of eye graze .

But the result is quite strange. Most of the coordination are very small or negative. That means most eye graze always point at the left top side. But the fact doesn't like that. Most of them are wrong.

Capture000

Please concern the circle and the center of circle. The center is the predicted point of eye gaze.

Capture001 Capture002

hugochan commented 5 years ago

@IvanKwokKC It's because the input data has been normalized. You may want to check out the official release of the code here.

IvanKwokKC commented 5 years ago

I find the normalization function in the code:

def normalize(data):
    shape = data.shape
    data = np.reshape(data, (shape[0], -1))
    data = data.astype('float32') / 255. # scaling
    data = data - np.mean(data, axis=0) # normalizing
return np.reshape(data, shape)

I am not good in statistics. I think this is zero mean normalization. data = data - np.mean(data, axis=0) # normalizing

Does it possible convert normalized data back to original one? I have no idea.

hugochan commented 5 years ago

@IvanKwokKC I think you can just keep the original data.

Vampire-Vx commented 5 years ago

I think the output is strange. The input has been normalized using a zero-mean function. However, the output always stay a small or negative number.

Vampire-Vx commented 5 years ago

train_y and val_y is actually the xy offset from your mobile phones camera. According to this dataset, the offset ranges from 0~20 centimeters. You normalize the input data but your did not normalize the output of the network. The problem is not the normalization.

hugochan commented 5 years ago

@Vampire-Vx Thank you for providing additional information. I wondered if the output has already been normalized by the original authors when releasing the dataset. The dataset I was using was a small sampling from the whole dataset. Please refer to #4 for more about this dataset. You may want to contact the original authors to get the raw output.