diff --git a/challenge/README.md b/challenge/README.md index 6c78a32..4f870e0 100644 --- a/challenge/README.md +++ b/challenge/README.md @@ -310,7 +310,8 @@ Please refresh the page, click `Login with Hugging Face` at the bottom of the le ### If I encounter a reshape error, what should I do? -You should first refer to this [location](https://github.com/OpenDriveLab/DriveLM/blob/main/challenge/evaluation.py#L90). Most of the reshape errors occur here. +You should first refer to this [location](https://github.com/OpenDriveLab/DriveLM/blob/main/challenge/evaluation.py#L89). Most of the reshape errors occur here. + ### Finally, which dataset do we submit to the competition? diff --git a/challenge/evaluation.py b/challenge/evaluation.py index d072275..afd646d 100644 --- a/challenge/evaluation.py +++ b/challenge/evaluation.py @@ -84,6 +84,8 @@ def match_result(self, answer, GT): answer_nums = re.findall(r'\d+\.\d+', answer) GT_nums = re.findall(r'\d+\.\d+', GT) # transform string into float + if len(answer_nums) % 2 != 0: + answer_nums = answer_nums[:-1] answer_nums = np.array([list(map(float, x.split()))[0] for x in answer_nums]).reshape(-1, 2) GT_nums = np.array([list(map(float, x.split()))[0] for x in GT_nums]).reshape(-1, 2) length = len(GT_nums)