File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 5757
5858"""
5959from collections import OrderedDict
60- from lpot .utils .utility import LazyImport
6160import copy
6261import time
6362import numpy as np
64-
65- tf = LazyImport ('tensorflow' )
66- pycocotools = LazyImport ('pycocotools' )
63+ from ..utils import logger
6764
6865from pycocotools import coco
6966from pycocotools import cocoeval
@@ -121,7 +118,7 @@ def LoadAnnotations(self, annotations):
121118 results = coco .COCO ()
122119 results .dataset ['images' ] = [img for img in self .dataset ['images' ]]
123120
124- tf . compat . v1 . logging .info (
121+ logger .info (
125122 'Loading and preparing annotation results...' )
126123 tic = time .time ()
127124
@@ -145,7 +142,7 @@ def LoadAnnotations(self, annotations):
145142 ann ['bbox' ] = mask .toBbox (ann ['segmentation' ])
146143 ann ['id' ] = idx + 1
147144 ann ['iscrowd' ] = 0
148- tf . compat . v1 . logging .info ('DONE (t=%0.2fs)' , (time .time () - tic ))
145+ logger .info ('DONE (t=%0.2fs)' , (time .time () - tic ))
149146
150147 results .dataset ['annotations' ] = annotations
151148 results .createIndex ()
You can’t perform that action at this time.
0 commit comments