-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metrics evaluation dataset #10
base: launch
Are you sure you want to change the base?
Conversation
New VGG13-fer-adapted model as per original FERPlus paper. The model is currently in training - and it is ready to switch to the new FERPlus dataset. Meanwhile, the whole infrastructure with the backend is in place and working.
A new instance of `EvaluationDataSource` is now available to be used specifically for metric calculation (i.e. Accuracy). The new special data source includes a list of selected samples per each class (10 each) that will be consistently used *only* to evaluate the online performance of the model (i.e. the learning machine).
…e selection This notebook contains all the code, and the analysis performed to identify and select the candidate faces (from the Validation Set) to be used for metric computation. The (data-driven) strategy considers an AutoEncoder trained on the training set, in an unsupervised fashion. The generated representation in the latent space is then passed on to a UMAP Dimension reduction model, to plot samples onto the embedding space (one for each data partition). For each generated embedding, centroids per each class are generated and the 10 closest samples to the centroids are identified. These are the chosen candidate samples to be used in metric evaluation.
This is brilliant! Working perfectly here. Are we ready to merge? |
Not yet. I moved the PR to These include:
I was just checking the last couple of things, and how the Will push the latest soon |
In previous implementation, indices of samples where chosen locally (i.e. per-emotion) and not globally (per whole dataset) resulting in a wrong overall sample selection. This has been fixed, and the corresponding notebook has been rerun, now containing correct sample references.
The new FERPlus dataset extends the previous FER dataset by using the new and improved labels from the FER+ dataset version. Further details can be found in the module documentation. To integrate the dataset within the backend, the majority label-strategy has been adopted for model training and evaluation.
FERPlus Dataset now is fully integrated into the backend as an available source. FERPlus is now available as a full-fledge dataset (to be used with the frontend) as well as plugged-in for evaluation as metric dataset. Corresponding functions and settings have been updated accordingly. Note: samples selection for FERPlus **Metric** Dataset have been chosen using a similar approach used for FER (further details in the next commit with the attached notebook)
…ataset. In this notebook, the auto-encoder model resembles the convolutional structure of a new model that will be used as an alternative backbone for the learning machine (subsequently named `VGGFERNet`)
…hts has been added too to enable pre-training.
Previous implementation was mistakenly considering the original samples on the board for evaluation, despite already using the metric dataset. New implementation further extends on that point by better integrating the selected `EvaluationDataset` by using its corresponding `evluation_sample` and `ground_truth` property for accuracy calculation.
…metric calculation
Ok @OliverDavis should be ready now for testing, and review. Please note that I've changed the defaults for the backend in this MR, therefore using the new The Final performance of this model are also quite decent too, on a full scale training:
Please feel free to let me know if theres's anything that's not clear, or requires fix :) Once this is merged, we might want to discuss how do we want to save annotations. TY |
I'm getting this when I run the backend: File "app.py", line 6, in Am I missing something from the Conda environment? (Or just missing something :-) |
I think this is because you don't probably have the That could be easily fixed with the following command:
Please let me know if that worked :) |
Thanks! Solved with pip -U numpy, updating numpy to version > 1.20. |
I've tried training this for a while, and I'm not sure it's learning anything at the moment: I'm stuck around 0.16 on the graph. Is that random chance with six categories? Very occasionally I get a jump up or down, but it quickly returns to 0.16. The donut plots change, but they remain identical for all the faces (i.e. all of them change in the same way). This might be expected behaviour, if training is very, very slow, although it seemed faster with the previous version. |
This PR introduces in the backend a new
EvaluationDataSource
created to calculate the metrics for the learning machine.This special data source holds reference to the original
FER
validation set, with selected samples (60
) used for model prediction.These samples have been chosen as a result of a data-driven analysis whose thorough documentation is available into a dedicated notebook, which is also part of the current PR (pls see
notebooks/FER_AutoEncoder.ipynb
)The PR also adds in a new
LearningMachine
Model (i.e.VGG13-FER
) which is the DL model originally used in theFERPlus
dataset.This model is currently under training - meanwhile the whole infrastructure is available and integrated in the backend for potential future use.