From 00595590840232c2a4491d3f41b695844a4eea38 Mon Sep 17 00:00:00 2001 From: TY Lin Date: Sat, 1 Oct 2016 16:38:27 -0400 Subject: [PATCH] PythonAPI/coco.py support unicode result file name --- PythonAPI/pycocotools/coco.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PythonAPI/pycocotools/coco.py b/PythonAPI/pycocotools/coco.py index 77a77c0..f23c73f 100644 --- a/PythonAPI/pycocotools/coco.py +++ b/PythonAPI/pycocotools/coco.py @@ -293,7 +293,7 @@ class COCO: print 'Loading and preparing results... ' tic = time.time() - if type(resFile) == str: + if type(resFile) == str or type(resFile) == unicode: anns = json.load(open(resFile)) elif type(resFile) == np.ndarray: anns = self.loadNumpyAnnotations(resFile) -- GitLab