f32d270262d975d4984743da41f2d3d4db1511f4,autokeras/pretrained/object_detector.py,ObjectDetector,load,#ObjectDetector#Any#,519
Before Change
file_link = Constant.PRE_TRAIN_DETECTION_FILE_LINK
// model_path = os.path.join(temp_path_generator(), "object_detection_pretrained.pth")
model_path = temp_path_generator() + "_object_detection_pretrained.pth"
download_file(file_link, model_path)
// load net
num_classes = len(VOC_CLASSES) + 1 // +1 for background
self.model = self._build_ssd("test", 300, num_classes) // initialize SSD
if self.device.startswith("cuda"):
After Change
def load(self, model_path=None):
if model_path is None:
model_path = download_model(Constant.OBJECT_DETECTOR["MODEL_LINK"], Constant.OBJECT_DETECTOR["MODEL_NAME"])
// load net
num_classes = len(VOC_CLASSES) + 1 // +1 for background
self.model = self._build_ssd("test", 300, num_classes) // initialize SSD
if self.device.startswith("cuda"):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: keras-team/autokeras
Commit Name: f32d270262d975d4984743da41f2d3d4db1511f4
Time: 2019-01-08
Author: yashwanth95tuniki@gmail.com
File Name: autokeras/pretrained/object_detector.py
Class Name: ObjectDetector
Method Name: load
Project Name: jhfjhfj1/autokeras
Commit Name: f32d270262d975d4984743da41f2d3d4db1511f4
Time: 2019-01-08
Author: yashwanth95tuniki@gmail.com
File Name: autokeras/pretrained/face_detector.py
Class Name: FaceDetector
Method Name: load