Releases: AdrienJaugey/Mask-R-CNN-Inference-Tool
Generalized Inference Tool
End of the internship, the tool has been generalized to use a configuration file that describes the different inference modes.
Inflammation mode has been added.
TF OD API models support and MEST-C inference modes
Breaking Changes
- Updated model used from Matterport's Mask R-CNN to TF OD API's Inception ResNet V2 Mask R-CNN. Former model's exclusive files has been removed.
Additions
- Added TensorflowDetector.py as model.py equivalent and acting as a 'proxy' of the
TF SavedModelmodel format. - Added support for MEST-C inference modes: mest_main and mest_glom.
Improvements
- Improved nephrology.py by reorganizing methods.
- Both mask and pixel precision confusion matrices are now computed and saved during same inference.
Last Matterport based version
Additions:
- Added exception handling to avoid stopping the inference tool if there are images remaining.
- Added low-memory mode that uses less RAM by loading the image only once in memory and reloading it whenever it changes.
- Added scripts that can be used to manage results easily (gathering specific file of results, gathering stats of a lot of files into a CSV file...).
- Added post-processing methods:
- Removal of masks on border or "empty" part of an image,
- Fusion of masks from different classes,
- Removal of orphan (and parent class masks without child class mask if enabled) masks,
- Removal of masks without enough area.
- Added method to keep only biggest part of masks if sparse masks are not allowed
- Added pixel precision confusion matrix. Be aware that based on the way it is computed, some errors on overlapping masks could not be represented in the confusion matrix.
- Added method to get automatically the last weight file using
%LAST%in the file path. It looks for a similar file path with the biggest number replacing the keyword.
Improvements:
- Improved code readability by factorizing methods.
- Optimized memory usage even without low-memory mode enabled.
- Improved generalization of the different methods.
- Improved tools by adding some features.
- Improved Confusion Matrix readability by representing large numbers with metric prefixes.
- Improved Confusion Matrix by avoiding counting as bad detections masks included in another mask from their parent class.
- Fixed bugs.
Memory Optimization, better progress display, TF 1.15.x Support & Dataset regeneration
Added mini-mask support that help reducing memory usage.
Optimized few processing (mask drawing, post-processing...).
Improved progress display using progress bar during inference, masks fusion & filtering.
Added TF 1.15.x support (GPU is usable through Google Colab Inference Tool).
Fixed few bugs (post-processing filtering, mask drawing method...).
Added Dataset regeneration mode to dataset generator (may depend on your libraries versions).
Standardization of the files names & minor changes
Update of the priority table.
Made the cortex & medulla masks disjoints.
Renamed Dataset generator & statistics extractor to match other tools' names.
Added Statistics extractor tool and fixed minor bugs
Added a new tool named statistics extractor, extracts total area and number of elements for each dataset class.
The cortex area is now correct in the "fusion" division statistics.
The size of fusion divisions is now correct.
Locked version to TF1 and fixed som bugs
As Matterport's Mask R-CNN has detection problems using Tensorflow 2, this function has been left unused and so it is better to remove it to avoid future problems.
Fixed a bug that would appear if the inference tool tries to move fusion files of an image that does not have cortex.
Added full resolution segmentation (V1)
Full resolution segmentation (V1) is now supported, meaning you can make a cortex mode inference and use the results to perform the main mode inference. With this version, the end results are not really accurate, as the image is only a copy-paste of multiple inferred sections of the initial image. Using this method, stats are not accurate as sections sometimes overlap with each other and we do not perform post-processing on masks, leading to scattered masks and areas counted multiple times in the stats.
Minor fix
Fixed Notebook name and kernel, this made a popup appeared on Google Colab.
Cortex mode added and usable !
Cortex segmentation mode has been reworked completely since previous tests (before v1.0.0) and is now usable. It has been added to the Inference notebook with some changes to switch between the two modes easily.
For now, the main segmentation mode is not started after cortex segmentation mode, but this will be coming in a future update.
Finally, fixed a serious bug that caused some masks to overlap while they should not, main segmentation mode with the same weights file that in previous versions will give better results with this one.