Esempio n. 1
0
 def get_default_model(self):
     """Downloads the default model"""
     self.ell_model = os.path.join(self.test_dir, self.model_name + '.ell')
     if (not os.path.isfile(self.ell_model)):
         print("downloading default model...")
         download_and_extract_model(
             "https://github.com/Microsoft/ELL-models/raw/master/models/ILSVRC2012/"
             + self.model_name + "/" + self.model_name + ".ell.zip",
             model_extension=".ell",
             local_folder=self.test_dir)
Esempio n. 2
0
 def get_default_model(self):
     """Downloads the default model"""
     if (os.path.isfile(self.ell_model)):
         # a full path was already provided to a local model, no need for download.
         pass
     else:
         self.ell_model = os.path.join(self.test_dir, self.model_name + '.ell')
         if (not os.path.isfile(self.ell_model)) :
             self.logger.info("downloading default model...")
             download_and_extract_model(
                 self.gallery_url + self.model_name + "/" + self.model_name + ".ell.zip",
                 model_extension=".ell",
                 local_folder=self.test_dir)
Esempio n. 3
0
 def get_default_model(self):
     """Downloads the default model"""
     self.ell_model = os.path.join(self.test_dir, self.model_name + '.ell')
     if (not os.path.isfile(self.ell_model)) or (not os.path.isfile(
             self.labels_file)):
         print("downloading default model...")
         download_and_extract_model(
             "https://github.com/Microsoft/ELL-models/raw/master/models/ILSVRC2012/d_I160x160x3CMCMCMCMCMCMC1AS/d_I160x160x3CMCMCMCMCMCMC1AS.ell.zip",
             model_extension=".ell",
             local_folder=self.test_dir)
         print("downloading default categories.txt...")
         self.labels_file = download_file(
             "https://github.com/Microsoft/ELL-models/raw/master/models/ILSVRC2012/categories.txt",
             local_folder=self.test_dir)