minus31 / BlazeFace

Implementating BlazeFace
MIT License
46 stars 15 forks source link

dataloader.py - what'a the output of this "labels"? #2

Open michaeldengxyz opened 4 years ago

michaeldengxyz commented 4 years ago

Inside dataloader.py:

img_files = glob.glob(dataset_dir)
img_files = [f for f in img_files if f[-3:] in IM_EXTENSIONS]

with open(label_path, "rb") as f:
    labels = pickle.load(f)

numofData = len(img_files)# endwiths(png,jpg ...)
data_idx = np.arange(numofData)

labels = pickle.load(f)
what'a the output of this array "labels"?

minus31 commented 4 years ago

The labels are differed by datasets and how you define the anchor boxes. I didn't make this repo to fit in a specific dataset. If you propose a dataset for an example, I would be able to answer your question.

HangJie720 commented 4 years ago

Hello, I’d like to ask you something about training data and labels. What data do you use to train the model? Is the link available ?

minus31 commented 4 years ago

@HangJie720

Hello, I used datasets that I make on my own. This code is kind of template to utilize for various datasets. Thank you for asking!

Jaren1907 commented 4 years ago

The labels are differed by datasets and how you define the anchor boxes. I didn't make this repo to fit in a specific dataset. If you propose a dataset for an example, I would be able to answer your question.

Hello, I have a dataset made by myself. the label is like (x, y, w, h), which means the left-top point, width and height of face in picture. I wonder how should I set the format of 'labels' in

with open(label_path, "rb") as f:
    labels = pickle.load(f)

I would appreciate it if you give me a little example, Thank you !

minus31 commented 4 years ago

@Jaren1907 Basically, BlazeFace uses Anchor box. Hence, the label form should follow Anchor scheme. To make anchor boxes, I recommend you to refer RetinaNet repo (https://github.com/fizyr/keras-retinanet)

suyali commented 3 years ago

@minus31 I stil have no idea about the setting of labels, can you give me an example?

wangm-word commented 3 years ago

Hello, I have a dataset made by myself. the label is like (x, y, w, h), which means the left-top point, width and height of face in picture. I wonder how should I set the format of 'labels' in,Can you give details?thank you!