Skip to content

Commit

Permalink
fix building errors
Browse files Browse the repository at this point in the history
  • Loading branch information
arodik committed May 9, 2024
1 parent bafdddc commit d6b03a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions embedding-calculator/src/_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ def healthcheck():

@app.route('/status')
def status_get():
available_plugins = {p.slug: str(p)
for p in managers.plugin_manager.plugins}
calculator = managers.plugin_manager.calculator
available_plugins = {"calculator": ENV.CALCULATION_PLUGIN,
"detector": ENV.FACE_DETECTION_PLUGIN,
"landmarks": ENV.FACE_DETECTION_PLUGIN,
}
return jsonify(
status='OK', build_version=ENV.BUILD_VERSION,
calculator_version=str(calculator),
similarity_coefficients=calculator.ml_model.similarity_coefficients,
calculator_version=ENV.CALCULATION_PLUGIN,
similarity_coefficients=[1.26538905, 5.552089201],
available_plugins=available_plugins
)

Expand Down
6 changes: 3 additions & 3 deletions embedding-calculator/src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ class ENV(Constants):
PYTORCH_MODE = get_env_bool('PYTORCH_MODE', True) # True or False
DEVICE = get_env('DEVICE', 'cpu') # 'cpu' or 'cuda:0'
RECOGNITION_MODEL = get_env('RECOGNITION_MODEL', 'ir_50')
RECOGNITION_MODEL_PATH = get_env('RECOGNITION_MODEL_PATH', 'services/facescan/plugins/adaface/pretrained/adaface_ir50_ms1mv2.ckpt')
RECOGNITION_MODEL_PATH = get_env('RECOGNITION_MODEL_PATH', 'src/services/facescan/plugins/adaface/pretrained/adaface_ir50_ms1mv2.ckpt')
DETECTOR_NAME = get_env('DETECTOR_NAME', 'retinaface') # mtcnn or retinaface
DETECTOR_NETWORK_NAME = get_env('DETECTOR_NETWORK_NAME', 'mobile0.25') # 'mobile0.25' or 'resnet50'
DETECTOR_MODEL_PATH = get_env('DETECTOR_MODEL_PATH', 'services/facescan/plugins/pytorch_detector/weights/mobilenet0.25_Final.pth')
PRETRAINED_MODEL_PATH = get_env('PRETRAINED_MODEL_PATH', 'services/facescan/plugins/pytorch_detector/weights/mobilenetV1X0.25_pretrain.tar')
DETECTOR_MODEL_PATH = get_env('DETECTOR_MODEL_PATH', 'src/services/facescan/plugins/pytorch_detector/weights/mobilenet0.25_Final.pth')
PRETRAINED_MODEL_PATH = get_env('PRETRAINED_MODEL_PATH', 'src/services/facescan/plugins/pytorch_detector/weights/mobilenetV1X0.25_pretrain.tar')

LOGGING_LEVEL = logging._nameToLevel[ENV.LOGGING_LEVEL_NAME]
ENV_MAIN = ENV
Expand Down

0 comments on commit d6b03a2

Please sign in to comment.