facebookresearch / facebookresearch/detectron2

TypeError: create_context() takes 2 positional arguments but 3 were given

Open
#2,456 3 comments 0 reactions 0 assignees View on GitHub
densepose
Dominant language
Python
Stars
34.7k
Forks
7.9k
PR merge metrics
No merged PRs in 30d

Description

(densepose2) wag@wag-SYS-7049GP-TRT:/home/ssl/ssl/detectron2/projects/DensePose$ **python apply_net.py dump configs/densepose_rcnn_R_50_FPN_s1x.yaml densepose_rcnn_R_50_FPN_s1x.pkl /home/ssl/ssl/dataset/Fashion-Video/image_frames/train/91-2Jb8DkfS/ --output train/91-2Jb8DkfSdump/dump.pkl -v**
** fvcore version of PathManager will be deprecated soon. **
** Please migrate to the version in iopath repo. **
https://github.com/facebookresearch/iopath

** fvcore version of PathManager will be deprecated soon. **
** Please migrate to the version in iopath repo. **
https://github.com/facebookresearch/iopath

[01/07 15:48:31 apply_net]: Loading config from configs/densepose_rcnn_R_50_FPN_s1x.yaml
[01/07 15:48:31 apply_net]: Loading model from densepose_rcnn_R_50_FPN_s1x.pkl
[01/07 15:48:38 apply_net]: Loading data from /home/ssl/ssl/dataset/Fashion-Video/image_frames/train/91-2Jb8DkfS/
Traceback (most recent call last):
File "apply_net.py", line 350, in
main()
File "apply_net.py", line 346, in main
args.func(args)
File "apply_net.py", line 95, in execute
context = cls.create_context(args, cfg)
**TypeError: create_context() takes 2 positional arguments but 3 were given**

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported command from the DensePose project directory, then inspect apply_net.py around execute() line 95 and locate the create_context definition and its call sites. Compare the arguments used by the caller and implementation; done means the command proceeds past context creation and produces the requested dump output without this TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.