MathGaron / mean_average_precision

Small and simple python/numpy utility to compute mean average precision (mAP) on detection task.
MIT License
117 stars 45 forks source link

SyntaxError: Non-ASCII character '\xe2' #12

Closed kuonangzhe closed 6 years ago

kuonangzhe commented 6 years ago

Thanks for the awesome work!

When I run the program in python2.7, there was a SyntxError in file mean_average_precision/mean_average_precision/utils/bbox.py:

Traceback (most recent call last):
  File "compute_mAP.py", line 15, in <module>
    from mean_average_precision.detection_map import DetectionMAP
  File "mean_average_precision/mean_average_precision/detection_map.py", line 3, in <module>
    from mean_average_precision.utils.bbox import jaccard
  File "mean_average_precision/mean_average_precision/utils/bbox.py", line 35
SyntaxError: Non-ASCII character '\xe2' in file mean_average_precision/mean_average_precision/utils/bbox.py on line 36, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Adding

# -*- coding: utf-8 -*-

at the beginning of the file solved the problem.

MathGaron commented 6 years ago

Thank you for reporting this bug. There was another python2 related bug in the show_frame function that is also fixed.