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

what all changes do I need to make when to train with only person class. #26

Open
ssbilakeri opened this issue Aug 5, 2021 · 2 comments

Comments

@ssbilakeri
Copy link

I get bellow error while training with only person class

Wrong annotation: class_id = 1. But class_id should be [from 0 to 0], file: data/crowdhuman-608x608/273278,77a600008ca1359b.txt

Kindly suggest what should i do ?

@jkjung-avt
Copy link
Owner

  1. In "data/gen_txts.py", remove the "head" ('hbox' -> class 0) code and redefine "full body" ('fbox') as class 0.

    if 'hbox' in obj.keys(): # head
    line = txt_line(0, obj['hbox'], img_w, img_h)
    if line:
    ftxt.write(line)
    if 'fbox' in obj.keys(): # full body
    line = txt_line(1, obj['fbox'], img_w, img_h)
    if line:
    ftxt.write(line)

  2. Remove the "head" class and keep only the "person" class in data/crowdhuman.names.

  3. Set "classes = 1" in data/crowdhuman-template.data.

@ssbilakeri
Copy link
Author

ssbilakeri commented Aug 9, 2021 via email

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