wuyuebupt / MSCeleb1MTensorflowModel

9 stars 0 forks source link

How to interpret output labels? #2

Closed cuihaoleo closed 6 years ago

cuihaoleo commented 6 years ago

I successfully run the test code after tons of minor modification. Your model takes a tensor of (?, 224, 224, 3) shape as input, and output logit tensor of (?, 99891) shape (corresponding to 99891 labels).

How can I map these 99891 labels to celebrity name / ID in the original MS-Celeb-1M database? I cannot find any hint in the code.

cuihaoleo commented 6 years ago

I tested my face-recognization code (see #3) on MS-Celeb-1M database of aligned face images, found out the most common label of each MID. Based on my obeservation of these results, I believe the following code rebuilds the mid-label mapping:

mid_list = load_all_mid("FaceImageCroppedWithAlignment.tsv")
mid_list.sort(key=lambda x: (x.replace("_", ""), x.find("_")))
for idx, mid in enumerate(mid_list):
    print(mid, idx, sep=",")
wuyuebupt commented 6 years ago

@cuihaoleo Sorry about the inconvenience. I found one file about the mapping. I update it at dataMapping/mid.mapping . Hope this will help.

cuihaoleo commented 6 years ago

Thanks.

Seems identical to my one.