Contribute¶
General contribution guidelines¶
Fork the repository on GitHub.
Install Feat on your machine.
Install
pytest
withpip install pytest
then run the tests in the repository withpytest
orpytest/feat/tests/
. Confirm that all tests pass on your system. If some tests fail, try to find out why they are failing. Common issues may be not having downloaded model files or missing dependencies.Create your feature.
Add tests to
feat/tests/
.Run the tests again with
pytest tests/
to make sure everything still passes, including your new feature. If you broke something, edit your feature so that it doesn’t break existing code.Create a pull request to the main repository’s
master
branch!
Model contribution guidelines¶
There are three key steps to adding a model.
Create a folder for the model you are building in the appropriate model type directory. If you are contributing an Action Unit detection model and calling it
mynewmodel
, create a folder infeat/feat/au_detectors/
. If it’s an Emotion detection model, add a folderfeat/feat/emo_detectors/
.Add your model architecture. Your model files could contained in a single (e.g.
feat/emo_detectors/ResMaskNet/resmasknet_test.py
) or they could be separated in to a model file (e.g./au_detectors/JAANet/JAA_model
) and a test file (e.g./au_detectors/JAANet/JAA_test
).Your model should be a class that has the appropriate method that the
Detector
can call it. For example, AU detectors should have the functionmynewmodel.detect_au()
that can be called.Add model to list of models in the
Detector
class infeat/detector.py
.Upload your trained model weights to an accessible locations (e.g. Google Drive).
Add tests to make sure your model is working.
Create a pull request to the main repository’s
master
branch!