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.
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.