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

[Feature] Support 300VW Dataset #2998

Closed

Conversation

KeqiangSun
Copy link
Contributor

@KeqiangSun KeqiangSun commented Mar 26, 2024

Motivation

In Facial Landmark Detection, 300VW is a significant dataset, which contains 104 videos, which over 218k frames. We add the 300VW dataset to mmpose for training and comparison.

Modification

We add 300VW pre-processing scripts, which convert the original dataset to coco format. We also add 300vw dataset as well as the test scripts.

BC-breaking (Optional)

Use cases (Optional)

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit tests to ensure correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • CLA has been signed and all committers have signed the CLA in this PR.

@CLAassistant
Copy link

CLAassistant commented Mar 26, 2024

CLA assistant check
All committers have signed the CLA.

@KeqiangSun KeqiangSun marked this pull request as ready for review March 26, 2024 07:42
@xiexinch xiexinch changed the base branch from main to dev-1.x April 1, 2024 05:56
@xiexinch xiexinch changed the title Support 300VW Dataset [Feature] Support 300VW Dataset Apr 1, 2024
Comment on lines 148 to 170
def test_annotation(self):
dataset = self.build_face_300vw_dataset(
data_mode='topdown', test_mode=True)

meta = {
'keypoint_id2name': None,
'keypoint_name2id': None,
'keypoint_colors': [(255, 255, 255)],
'skeleton_links': None,
'skeleton_link_colors': None
}
visualizer = FastVisualizer(meta, radius=1)

vis_dir = os.path.join(os.path.dirname(dataset.ann_file), 'vis')
os.makedirs(vis_dir, exist_ok=True)

for i in range(len(dataset)):
instance = dataset.prepare_data(i)
img = cv2.imread(instance['img_path'])
visualizer.draw_points(img, instance['keypoints'][0])
save_path = os.path.join(vis_dir,
os.path.basename(instance['img_path']))
cv2.imwrite(save_path, img)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This test method has no exception checking.

@@ -76,3 +78,63 @@ def draw_pose(self, img, instances):
color, -1)
cv2.circle(img, (int(x_coord), int(y_coord)), self.radius,
(255, 255, 255))

def draw_points(self, img, instances):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add type hints.

@xiexinch
Copy link
Collaborator

xiexinch commented Apr 1, 2024

Hi @KeqiangSun,
Thanks for your contribution! Please sign the CLA.

@KeqiangSun KeqiangSun closed this Apr 2, 2024
@KeqiangSun KeqiangSun deleted the KeqiangSun/Face300VW branch April 2, 2024 08:40
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.

3 participants