CoolFace
Datasetpublic

gaunernst/ms1mv3-recordio

MS-Celeb-1M (v3) This dataset is introduced in the Lightweight Face Recognition Challenge at ICCV 2019. Paper. There are 5,179,510 images and 93,431 ids. All images are aligned based on facial landmarks predicted by RetinaFace and resized to 112x112. This was downloaded from https://github.com/deepinsight/insightface/tree/master/recognition/_datasets_ (MS1M-RetinaFace). The dataset is stored in MXNet RecordIO format. Usage import io import numpy as np from PIL… See the full description on the dataset page: https://huggingface.co/datasets/gaunernst/ms1mv3-recordio.

sourceHugging Faceupdated 2y agoView on Hugging Face
2likes380downloads
Dataset Card

MS-Celeb-1M (v3)

This dataset is introduced in the Lightweight Face Recognition Challenge at ICCV 2019. Paper.

There are 5,179,510 images and 93,431 ids. All images are aligned based on facial landmarks predicted by RetinaFace and resized to 112x112.

This was downloaded from https://github.com/deepinsight/insightface/tree/master/recognition/_datasets_ (MS1M-RetinaFace). The dataset is stored in MXNet RecordIO format.

Usage

python
import io
import numpy as np
from PIL import Image

np.bool = bool  # fix for mxnet
from mxnet.recordio import MXIndexedRecordIO, unpack

record = MXIndexedRecordIO("ms1m-retinaface-t1/train.idx", "ms1m-retinaface-t1/train.rec", "r")

header, _ = unpack(record.read_idx(0))
size = int(header.label[0]) - 1
n_classes = int(open("ms1m-retinaface-t1/property").read().split(",")[0])

sample_idx = 100  # from 0 to size-1
header, raw_img = unpack(record.read_idx(sample_idx + 1))

label = header.label
if not isinstance(label, (int, float)):
    label = label[0]
label = int(label)

img = Image.open(io.BytesIO(raw_img))  # using cv2.imdecode is also possible