ensure_dir(temp_path)
for model_link, file_path in zip(Constant.FACE_DETECTION_PRETRAINED["PRETRAINED_MODEL_LINKS"],
Constant.FACE_DETECTION_PRETRAINED["FILE_NAMES"]):
download_file(model_link, f"{temp_path}/{file_path}")
def predict(self, img_path, output_file_path=None):
Predicts faces in an image.
After Change
def load(self, model_path=None):
model_paths = [download_model(model_link, file_name) for model_link, file_name in zip(
Constant.FACE_DETECTOR["MODEL_LINKS"], Constant.FACE_DETECTOR["MODEL_NAMES"])]
return model_paths
def predict(self, img_path, output_file_path=None):