mmtracking icon indicating copy to clipboard operation
mmtracking copied to clipboard

AssertionError: The number of person ids in the training set must be greater than the number of person ids in the sample.

Open GerogeLee0115 opened this issue 2 years ago • 2 comments

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug A clear and concise description of what the bug is.

Reproduction

  1. What command or script did you run?
A placeholder for the command.
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
  2. What dataset did you use and what task did you run?

Environment

  1. Please run python mmtrack/utils/collect_env.py to collect necessary environment information and paste it here.
  2. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback If applicable, paste the error trackback here.

A placeholder for trackback.

Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

GerogeLee0115 avatar Feb 05 '23 08:02 GerogeLee0115

Hello, I have the same problem, how did you solve it? I would appreciate your reply.

Aurelion1 avatar Sep 25 '23 12:09 Aurelion1

I fix it by enlarging train set, the function "triplet_sampling(self, pos_pid, num_ids=8, ins_per_id=4)" in mmtracking/mmtrack/datasets/reid_dataset.py has num_ids=8 default, so person ids in your train dataset must greater than 8.

liujisihan avatar Dec 14 '23 09:12 liujisihan