dbolya / yolact

A simple, fully convolutional model for real-time instance segmentation.
MIT License
5k stars 1.33k forks source link

AttributeError: 'list' object has no attribute 'argsort' #514

Open ghazni123 opened 4 years ago

ghazni123 commented 4 years ago

Hi

I have request for info on following two points:

Q1: I get the error "AttributeError: 'list' object has no attribute 'argsort'" when I run the below command:

python3 eval.py --trained_model=weights/yolact_plus_base_54_800000.pth --score_threshold=0.15 --top_k=15 --video_multiframe=4 --video=/home/streams/sample.mp4 Multiple GPUs detected! Turning off JIT. Config not specified. Parsed yolact_plus_base_config from the file name.

Loading model... Done. Initializing model... Done.

Press Escape to close. Traceback (most recent call last): File "eval.py", line 1105, in evaluate(net, dataset) File "eval.py", line 892, in evaluate evalvideo(net, args.video) File "eval.py", line 832, in evalvideo frame_buffer.put(frame['value'].get()) File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get raise self._value File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "eval.py", line 712, in prep_frame return prep_display(preds, frame, None, None, undo_transform=False, class_color=True, fps_str=fps_str) File "eval.py", line 155, in prep_display idx = t[1].argsort(0, descending=True)[:args.top_k] AttributeError: 'list' object has no attribute 'argsort'

This has a random behaviour and happens quite often when I execute the command without --cuda=1. However it does also happens when executing with --cuda=1 though less often.

Please advise. Thanks.

Q2: If I don't add config then get the warning "Config not specified. Parsed yolact_plus_base_config from the file name." but if I specify config as per directions (yolact_base in filename yolact_base_54_800000.pth) then get the error e.g.

python3 eval.py --config=yolact_base --trained_model=weights/yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --image=./src-images/preview.jpg Multiple GPUs detected! Turning off JIT. Traceback (most recent call last): File "eval.py", line 1053, in set_cfg(args.config) File "/home/yolact-2020.01.25/data/config.py", line 818, in set_cfg cfg.replace(eval(config_name)) File "", line 1, in NameError: name 'yolact_base' is not defined

Is this correct way to specify config?

Thank you.

suchiz commented 3 years ago

Q1: He already replied to this in a previous issue. Just change 'rescore_bbox' to True in data/config.py Q2: it is --config=yolact_base_config, you forgot "_config" or yolact_plus_base_config for YOLACT++. but there are other config. Just check the config.py file, you'll see every config name and their parameters