[✓ ] I have searched related issues but cannot get the expected help.
[✓ ] The bug has not been fixed in the latest version.
Describe the bug
While trying to run the "demo/top_down_pose_tracking_demo_with_mmtracking.py" i get the error in the title:
ValueError: LinearReIDHead: Please choose at least one loss in triplet loss and cross entropy loss.
or
ValueError: Tracktor: BaseReID: LinearReIDHead: Please choose at least one loss in triplet loss and cross entropy loss.
I have been successful to run all the other top-down demo. just stuck in this one with mmtracking.
1. 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 traceback here.
/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmdet/core/anchor/builder.py:17: UserWarning: build_anchor_generator would be deprecated soon, please use build_prior_generator
'build_anchor_generator would be deprecated soon, please use '
Traceback (most recent call last):
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg
return obj_cls(**args)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/models/reid/linear_reid_head.py", line 58, in init
raise ValueError('Please choose at least one loss in '
ValueError: Please choose at least one loss in triplet loss and cross entropy loss.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg
return obj_cls(args)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/models/reid/base_reid.py", line 11, in init
super().init(*args, *kwargs)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcls/models/classifiers/image.py", line 25, in init
self.head = build_head(head)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcls/models/builder.py", line 25, in build_head
return HEADS.build(cfg)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 212, in build
return self.build_func(args, kwargs, registry=self)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
ValueError: LinearReIDHead: Please choose at least one loss in triplet loss and cross entropy loss.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg
return obj_cls(*args)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/models/mot/tracktor.py", line 28, in init
self.reid = build_reid(reid)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/models/builder.py", line 23, in build_reid
return REID.build(cfg)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 212, in build
return self.build_func(args, **kwargs, registry=self)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
ValueError: BaseReID: LinearReIDHead: Please choose at least one loss in triplet loss and cross entropy loss.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/user/mmpose/mmpose/demo/top_down_pose_tracking_demo_with_mmtracking.py", line 165, in
main()
File "/home/user/mmpose/mmpose/demo/top_down_pose_tracking_demo_with_mmtracking.py", line 81, in main
args.tracking_config, None, device=args.device.lower())
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/apis/inference.py", line 34, in init_model
model = build_model(config.model)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/models/builder.py", line 34, in build_model
return MODELS.build(cfg)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
ValueError: Tracktor: BaseReID: LinearReIDHead: Please choose at least one loss in triplet loss and cross entropy loss.
Checklist
[✓ ] I have searched related issues but cannot get the expected help.
[✓ ] The bug has not been fixed in the latest version.
Describe the bug
While trying to run the "demo/top_down_pose_tracking_demo_with_mmtracking.py" i get the error in the title:
ValueError: LinearReIDHead: Please choose at least one loss in triplet loss and cross entropy loss.
orValueError: Tracktor: BaseReID: LinearReIDHead: Please choose at least one loss in triplet loss and cross entropy loss.
I have been successful to run all the other top-down demo. just stuck in this one with mmtracking.Reproduction
Environment
PYTHONPATH=${PWD}:$PYTHONPATH python mmpose/utils/collect_env.py
to collect necessary environment information and paste it here.TorchVision: 0.5.0+cu100 OpenCV: 4.5.3 MMCV: 1.3.12 MMCV Compiler: GCC 7.5 MMCV CUDA Compiler: 10.0 MMPose: 0.17.0+e336702
/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmdet/core/anchor/builder.py:17: UserWarning:
build_anchor_generator
would be deprecated soon, please usebuild_prior_generator
'build_anchor_generator
would be deprecated soon, please use ' Traceback (most recent call last): File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(**args) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/models/reid/linear_reid_head.py", line 58, in init raise ValueError('Please choose at least one loss in ' ValueError: Please choose at least one loss in triplet loss and cross entropy loss.During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(args) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/models/reid/base_reid.py", line 11, in init super().init(*args, *kwargs) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcls/models/classifiers/image.py", line 25, in init self.head = build_head(head) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcls/models/builder.py", line 25, in build_head return HEADS.build(cfg) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 212, in build return self.build_func(args, kwargs, registry=self) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') ValueError: LinearReIDHead: Please choose at least one loss in triplet loss and cross entropy loss.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(*args) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/models/mot/tracktor.py", line 28, in init self.reid = build_reid(reid) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/models/builder.py", line 23, in build_reid return REID.build(cfg) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 212, in build return self.build_func(args, **kwargs, registry=self) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') ValueError: BaseReID: LinearReIDHead: Please choose at least one loss in triplet loss and cross entropy loss.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/user/mmpose/mmpose/demo/top_down_pose_tracking_demo_with_mmtracking.py", line 165, in
main()
File "/home/user/mmpose/mmpose/demo/top_down_pose_tracking_demo_with_mmtracking.py", line 81, in main
args.tracking_config, None, device=args.device.lower())
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/apis/inference.py", line 34, in init_model
model = build_model(config.model)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmtrack/models/builder.py", line 34, in build_model
return MODELS.build(cfg)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/home/user/mmpose/mmpose/env/lib/python3.6/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
ValueError: Tracktor: BaseReID: LinearReIDHead: Please choose at least one loss in triplet loss and cross entropy loss.