Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed VGGFace2 #82

Merged
merged 14 commits into from
Jan 18, 2021
Merged

Fixed VGGFace2 #82

merged 14 commits into from
Jan 18, 2021

Conversation

yasakova-anastasia
Copy link

@yasakova-anastasia yasakova-anastasia commented Jan 13, 2021

Summary

  • Fixed the problem VGGFace2 as FR dataset #77 (add labels; landmarks/bboxes are optional, but the .csv file with image names must be)

How to test

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@yasakova-anastasia yasakova-anastasia linked an issue Jan 13, 2021 that may be closed by this pull request
datumaro/plugins/vgg_face2_format.py Outdated Show resolved Hide resolved
datumaro/plugins/vgg_face2_format.py Outdated Show resolved Hide resolved
datumaro/plugins/vgg_face2_format.py Outdated Show resolved Hide resolved
datumaro/plugins/vgg_face2_format.py Outdated Show resolved Hide resolved
datumaro/plugins/vgg_face2_format.py Outdated Show resolved Hide resolved
datumaro/plugins/vgg_face2_format.py Outdated Show resolved Hide resolved
datumaro/plugins/vgg_face2_format.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jihyeonyi jihyeonyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most FR researchers usually align and crop faces before the training as a pre-process.
So in the training time, they only use images without the '.csv' file.
So how about generating Lable annotation even if '.csv' file isn't provided.
Or another way to handle this is to create a new extractor for the general FR dataset.

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Jan 13, 2021

@jihyeonyi,

Most FR researchers usually align and crop faces before the training as a pre-process.
So in the training time, they only use images without the '.csv' file.
So how about generating Lable annotation even if '.csv' file isn't provided.
Or another way to handle this is to create a new extractor for the general FR dataset.

Isn't it exactly ImageNet classification format?

@jihyeonyi
Copy link
Contributor

@zhiltsov-max

@jihyeonyi,

Most FR researchers usually align and crop faces before the training as a pre-process.
So in the training time, they only use images without the '.csv' file.
So how about generating Lable annotation even if '.csv' file isn't provided.
Or another way to handle this is to create a new extractor for the general FR dataset.

Isn't it exactly ImageNet classification format?

Technically you're right if ImageNet supports more image formats.
But is it a little bit strange if the user should use ImageNet format for VggFace2?
I'd like to know your opinion.

@zhiltsov-max
Copy link
Contributor

@jihyeonyi, yes, it is strange. Actually, I think, we need to slightly change the structure of Extractor to simplify this kind of integration between sub-formats (ImageNet dataset uses detection from from PASCAL VOC, CamVid uses segmentation from VOC etc.).

@jihyeonyi
Copy link
Contributor

@jihyeonyi, yes, it is strange. Actually, I think, we need to slightly change the structure of Extractor to simplify this kind of integration between sub-formats (ImageNet dataset uses detection from from PASCAL VOC, CamVid uses segmentation from VOC etc.).

Good idea. I'm of the same opinion.
So, we can expect this issue to be solved next time, right?

@zhiltsov-max
Copy link
Contributor

@jihyeonyi, it definitely won't be done in this PR, more likely in Q1.

label_name = item_id.split('/')[0]
label = self._categories[AnnotationType.label].find(label_name)[0]
if label is not None:
item_id = item_id[len(label_name) + 1:]
Copy link
Contributor

@zhiltsov-max zhiltsov-max Jan 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why there can be no label directory prefix?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If for example item.id = a/1 and there is no label

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a folder for unlabeled items (like in ImageNet)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a good idea, because otherwise we require labels.txt.

zhiltsov-max
zhiltsov-max previously approved these changes Jan 15, 2021
Copy link
Contributor

@zhiltsov-max zhiltsov-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only problem I see is that the former issue is not resolved.

jihyeonyi
jihyeonyi previously approved these changes Jan 18, 2021
@zhiltsov-max zhiltsov-max dismissed stale reviews from jihyeonyi and themself via 1d652d2 January 18, 2021 06:50
@zhiltsov-max zhiltsov-max merged commit c754d7e into develop Jan 18, 2021
@yasakova-anastasia yasakova-anastasia deleted the ay/fix-vggface2 branch January 18, 2021 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VGGFace2 as FR dataset
3 participants