Open hanjianwei92 opened 2 years ago
"after fix random_color() , other errors still occurred." What are the other errors that you met?
"after fix random_color() , other errors still occurred." What are the other errors that you met?
can you run demo with "--webcam" normally?
i run
python demo/demo.py --config-file configs/transfiner/mask_rcnn_R_50_FPN_1x.yaml --webcam --opts MODEL.WEIGHTS ./pretrained_model/output_1x_transfiner_r50.pth
, but many errors occurred.[07/20 21:26:09 fvcore.common.checkpoint]: [Checkpointer] Loading from ./pretrained_model/output_1x_transfiner_r50.pth ... 0it [00:00, ?it/s]C:\software\Miniconda3\envs\transfiner\lib\site-packages\detectron2-0.5-py3.7-win-amd64.egg\detectron2\modeling\roi_heads\fast_rcnn.py:154: UserWarning: This overload of nonzero is deprecated: nonzero() Consider using one of the following signatures instead: nonzero(*, bool as_tuple) (Triggered internally at ..\torch\csrc\utils\python_arg_parser.cpp:882.) filter_inds = filter_mask.nonzero() C:\software\Miniconda3\envs\transfiner\lib\site-packages\torch\nn\functional.py:3063: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. "See the documentation of nn.Upsample for details.".format(mode)) C:\software\Miniconda3\envs\transfiner\lib\site-packages\detectron2-0.5-py3.7-win-amd64.egg\detectron2\utils\videovisualizer.py:190: DeprecationWarning:
for vis in tqdm.tqdm(demo.run_on_video(cam)):
File "C:\software\Miniconda3\envs\transfiner\lib\site-packages\tqdm\std.py", line 1195, in iter
for obj in iterable:
File "C:\Users\hanji\Downloads\transfiner-main\demo\predictor.py", line 129, in run_on_video
yield process_predictions(frame, self.predictor(frame))
File "C:\Users\hanji\Downloads\transfiner-main\demo\predictor.py", line 98, in process_predictions
vis_frame = video_visualizer.draw_instance_predictions(frame, predictions)
File "C:\software\Miniconda3\envs\transfiner\lib\site-packages\detectron2-0.5-py3.7-win-amd64.egg\detectron2\utils\video_visualizer.py", line 88, in draw_instance_predictions
colors = self._assign_colors(detected)
File "C:\software\Miniconda3\envs\transfiner\lib\site-packages\detectron2-0.5-py3.7-win-amd64.egg\detectron2\utils\video_visualizer.py", line 233, in _assign_colors
inst.color = random_color(rgb=True, maximum=1)
TypeError: random_color() missing 1 required positional argument: 'ii'
np.bool
is a deprecated alias for the builtinbool
. To silence this warning, usebool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool` here. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations is_crowd = np.zeros((len(instances),), dtype=np.bool) 0it [00:04, ?it/s] Traceback (most recent call last): File "demo/demo.py", line 143, inafter fix random_color() , other errors still occurred.