-
Notifications
You must be signed in to change notification settings - Fork 16
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
Latest updates on performance optimization and validation #88
Open
matteobeltrami
wants to merge
34
commits into
dev
Choose a base branch
from
train_optim
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge valid
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The object detection recipe has been modified to improve the performance (in terms of mAP) of the networks supported within micromind.
Until the latest version of micromind, the mean average precision (mAP) metric was calculated using a function we implemented, however the performances did not coincide with those calculated with the ultralytics methods. The ultralytics validation and metrics calculation code was therefore adapted to make it compliant with our code and models.
Furthermore, some hyperparameters have been changed that optimize the performance obtained from the training of the object detection models.
To note
The
recipes/object_detection/validation/
folder contains the revisited ultralytics code that manages the validation of a model.In order to deal with ultralytics validation scripts:
the forward method in the training script has been modified in order to differentiate whether the model is in training or validation state and whether it requires to perform preprocessing;
the mAP metric is not an instance of the
Metric
class, it only gets calculated at the end of every training epoch by overwriting (and thus calling) theon_train_epoch_end()
function.When using the validation utilities and script you can choose to set the
verbose
argument to True in order to print details regarding the number of images, instances and metrics for each class of the dataset, and theplots
argument to True in order to saves the plots of the confusion matrix, the F1-Confidence, Precision-Confidence, Precision-Recall, Recall-Confidence curves and the predictions and labels of the first three batches of images.The inference script has been modified in order to deal also with images in RGBA format (simply the "transparency" channel gets ignored).