-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xiexinch
reviewed
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) |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add type hints.
Hi @KeqiangSun, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
After PR: