FaceRec icon indicating copy to clipboard operation
FaceRec copied to clipboard

Transform model fine-tuning code to Python package

Open Devasy opened this issue 2 years ago • 1 comments

Transform the model fine-tuning code in the Jupyter notebook files into a Python package named deeptune to help people fine-tune and train models of siamese architecture.

  • Package Structure:

    • Create deeptune package with subdirectories: data, models, training, evaluation, utils, and cli.
    • Add __init__.py files to each subdirectory to make them sub-packages.
    • Add config.py for configuration settings.
    • Add requirements.txt to list dependencies.
  • CLI Support:

    • Create cli.py in cli subdirectory to allow users to interact with the package through the command line.
    • Implement evaluate_model command to evaluate models.
  • Loss Functions:

    • Implement Triplet Loss, ArcFace Loss, and Contrastive Loss in training/losses.py.
  • Data Generators:

    • Implement TripletGenerator in training/data_generators.py to generate triplets for the triplet loss function.
  • Evaluation:

    • Move Model-Training/eval-mark-I.py to evaluation/eval_mark_I.py and update imports.
    • Move Model-Training/Evaluate_model_1.ipynb to evaluation/evaluate_model_1.ipynb and update imports.
  • Documentation:

    • Update README.md to include instructions for using the new Python package, CLI usage, and example code.

For more details, open the Copilot Workspace session.

Devasy avatar Oct 30 '24 04:10 Devasy

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Oct 30 '24 04:10 sonarqubecloud[bot]