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

no arguments supplied to model = infer_engine.initialize_model_from_cfg() #1

Open
bmabir17 opened this issue Aug 13, 2018 · 1 comment

Comments

@bmabir17
Copy link

bmabir17 commented Aug 13, 2018

On line 103 in inference.py the weights arguments are not inserted.
The correct line should be
model = infer_engine.initialize_model_from_cfg(args.weights)

Edit:
After giving the weights file the following error occurs
'
Traceback (most recent call last):
File "tools/inference.py", line 160, in
main(args)
File "tools/inference.py", line 103, in main
model = infer_engine.initialize_model_from_cfg(args.weights)
File "/detectron/detectron/core/test_engine.py", line 328, in initialize_model_from_cfg
model = model_builder.create(cfg.MODEL.TYPE, train=False, gpu_id=gpu_id)
File "/detectron/detectron/modeling/model_builder.py", line 120, in create
init_params=train
File "/detectron/detectron/modeling/detector.py", line 49, in init
assert self.num_classes > 0, 'num_classes must be > 0'
AssertionError: num_classes must be > 0
'
I am using the docker image of the detectron. And was able to run the demo of infer_simple.py on a picture. so i think the detectron setup is not a problem.

@ganliqiang
Copy link

i have the same problem do you have fixed it ?

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