diff --git a/PythonAPI/pycocotools/coco.py b/PythonAPI/pycocotools/coco.py index 77a77c0d4ce5b10dca0a0ac2bdc0c3ae4664c867..f23c73ffe7891316724cc5267ebf232064f2f881 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)