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

Keypoints annotator release #52

Closed
tfederico opened this issue Jul 14, 2021 · 15 comments
Closed

Keypoints annotator release #52

tfederico opened this issue Jul 14, 2021 · 15 comments

Comments

@tfederico
Copy link

Hello,

thanks for the amazing work!

Are you planning to release the keypoints annotator any time soon?

@chingswy
Copy link
Contributor

Sure. Please stay tuned.

@tfederico
Copy link
Author

@chingswy any update on this?

@chingswy
Copy link
Contributor

chingswy commented Oct 7, 2021

Try to run python3 apps/annotation/annot_keypoints.py ${data}. If any bugs, please report to me.

@tfederico
Copy link
Author

It appears that the links for step 0.2 and 0.3 of the installation documentation are broken
https://github.com/zju3dv/EasyMocap/blob/master/doc/installation.md

@chingswy
Copy link
Contributor

chingswy commented Oct 7, 2021

This two steps are not necessary for annotation.

@tfederico
Copy link
Author

tfederico commented Oct 7, 2021

Would using HRNet speed up the annotation process?

Anyway, I created a folder images, with a subfolder book and inside book there are images to annotate.
When I run the command, I get the following error:

    Demo code for annotation:
    - Input : /home/federico/Pictures/
    -      => book
    -      => annots

Traceback (most recent call last):
  File "annot_keypoints.py", line 137, in <module>
    annot_example(args.path, image=args.image, annot=args.annot, sub=sub, step=args.step, args=args)
  File "annot_keypoints.py", line 125, in annot_example
    step=step)
  File "/home/federico/Git/EasyMocap/easymocap/annotator/basic_annotator.py", line 68, in __init__
    self.set_frame(self.start)
  File "/home/federico/Git/EasyMocap/easymocap/annotator/basic_annotator.py", line 148, in set_frame
    imgname, annname = self.dataset[nf]
  File "/home/federico/Git/EasyMocap/easymocap/annotator/basic_dataset.py", line 43, in __getitem__
    imgname = join(self.image_root, self.imgnames[index])
IndexError: list index out of range

@chingswy
Copy link
Contributor

chingswy commented Oct 7, 2021

Are there images in /home/federico/Pictures/images/book and named in the format %06d.jpg?

@tfederico
Copy link
Author

tfederico commented Oct 7, 2021

they were named using %05.png. Did I miss any documentation describing the format of the name?
I changed it to the format you suggested and I got this

    Demo code for annotation:
    - Input : /home/federico/Pictures/
    -      => book
    -      => annots

Traceback (most recent call last):
  File "apps/annotation/annot_keypoints.py", line 137, in <module>
    annot_example(args.path, image=args.image, annot=args.annot, sub=sub, step=args.step, args=args)
  File "apps/annotation/annot_keypoints.py", line 125, in annot_example
    step=step)
  File "/home/federico/Git/EasyMocap/easymocap/annotator/basic_annotator.py", line 68, in __init__
    self.set_frame(self.start)
  File "/home/federico/Git/EasyMocap/easymocap/annotator/basic_annotator.py", line 149, in set_frame
    self.set_param(param, imgname, annname, nf, no_img=self.no_img)
  File "/home/federico/Git/EasyMocap/easymocap/annotator/basic_annotator.py", line 125, in set_param
    annots = load_annot_to_tmp(annname)
  File "/home/federico/Git/EasyMocap/easymocap/annotator/file_utils.py", line 36, in load_annot_to_tmp
    if not os.path.exists(annotname):
  File "/home/federico/anaconda3/envs/easymocap/lib/python3.7/genericpath.py", line 19, in exists
    os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

@tfederico
Copy link
Author

i guess that means that I should provide annotations? What if I don't have any?

@chingswy
Copy link
Contributor

chingswy commented Oct 8, 2021

Please run this first which detect the human keypoints by OpenPose.

@tfederico
Copy link
Author

tfederico commented Oct 8, 2021

When I do that the only output I get is

cameras:

@tfederico
Copy link
Author

Nevermind, I actually figured out that the data path should be the parent folder of images

@tfederico
Copy link
Author

I managed to run the annotator and got the following info:

Here is the help:
------------------
    h:  print the help
    H:  None
    q:  quit the annotation
     :  skip the annotation
    p:  capture the screen
    A:  Automatic running
    z:  continue automatic
    k:  set/unset the key-frame
    w:  Move to last step frame
    a:  Move to last frame
    s:  Move to next step frame
    d:  Move to next frame
    0:  set the bbox ID to 0
    s0:  choose the bbox of ID 0
    1:  set the bbox ID to 1
    s1:  choose the bbox of ID 1
    2:  set the bbox ID to 2
    s2:  choose the bbox of ID 2
    3:  set the bbox ID to 3
    s3:  choose the bbox of ID 3
    4:  set the bbox ID to 4
    s4:  choose the bbox of ID 4
    v:  set the selected joints unvisible
    V:  set the selected joints unvisible if previous unvisible
    f:  set the face unvisible
    c:  check the tracking keypoints
    m:  mirror the keypoints2d
    M:  mirror the keypoints2d of legs and feet
Examples: 
  - noshow r t: automatic removing and tracking
  - noshow nostop r t r c: automatic removing and tracking, if missing, just copy

However, it's not very clear to me how I can add keypoints using the annotator if OpenPose was not able to detect them in the first place. I figured that if I click on the center of the bounding box then I can move around the keypoints that are already there, but I don't see how to add new ones.

Do you have any documentation about how to use the annotator?
For example, if I press k it should set/unset the key-frame, but what do you mean by that?

@tfederico
Copy link
Author

@chingswy any guideline about annotating missing keypoints?

@chingswy
Copy link
Contributor

In current version, there is no way to annotate this. Because OpenPose or HRNet always guess a position of keypoints although it's totally wrong. So we just need to set them unvisible. If your data missed lots of keypoints, you should add a script to place them to a wrong position and adjust them manually.

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

No branches or pull requests

2 participants