pytorch-YOLOv4
pytorch-YOLOv4 copied to clipboard
do_detect() takes from 4 to 5 positional arguments but 6 were given
In pytorch-YOLOv4/evaluate_on_coco.py, line 176, it shows:
do_detect(model, throwaway_image, 0.5, 80, 0.4, use_cuda)
But in the do_detect definition, in file pytorch-YOLOv4/tool/torch_utils.py, line 76, the function definition only shows 5 positional arguments.
def do_detect(model, img, conf_thresh, nms_thresh, use_cuda=1)
The '80' should be removed from evaluate_on_coco.py.
Agreed, 2 occurences of do_detect()
need to be fixed in this evaluate_on_coco.py
file.
remove that 0.4 ( confidence ) and it will work but you will get another error regarding unknown image type
remove that 0.4 ( confidence ) and it will work but you will get another error regarding unknown image type
I don't think you should remove the conf_thresh, instead you should remove the 80, which probably is an argument like max_num_pred, because if you check the definition of do_detect
, you will see that there is conf_thresh
and nms_thresh
, but no argument like max_num_pred
.
Regarding the datatype error, I think it should be replaced with cv2.imread
, I have fixed this. Maybe I will do a PR later.
I don't think you should remove the conf_thresh, instead you should remove the 80, which probably is an argument like max_num_pred, because if you check the definition of
do_detect
, you will see that there isconf_thresh
andnms_thresh
, but no argument likemax_num_pred
.
I think the '80' refers to the default number of classes.
remove that 0.4 ( confidence ) and it will work but you will get another error regarding unknown image type
I don't think you should remove the conf_thresh, instead you should remove the 80, which probably is an argument like max_num_pred, because if you check the definition of
do_detect
, you will see that there isconf_thresh
andnms_thresh
, but no argument likemax_num_pred
. Regarding the datatype error, I think it should be replaced withcv2.imread
, I have fixed this. Maybe I will do a PR later.
Hi sir, can you tell replace cv2.imread with what?