All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
Unreleased - 0.10.0a1
- torch 1.9.0
- tochvision 0.10
- mmdet 2.16.0
- mmcv 1.3.14
- fastai 2.5.2
- pytorch-lightning 1.4.8
Unreleased - 0.9.0a1
- Low level parsing workflow with
RecordCollection
- Semantic segmentation support with fastai
- Breaking: Refactored mask components workflow
- Breaking: Due to the new mask components refactor, autofix doesn't work for mask components anymore.
end2end_detect()
: Run Object Detection inference (onlybboxes
) on a single image, and return predicted boxes corresponding to original image size -Breaking: BaseLabelsRecordComponentas_dict()
now returns bothlabels
and labels_ids
.labels
are now strings instead of integers.
- Breaking: On
tfms.A.aug_tfms
parametersize
andpresize
changed from order (height, width) to (width, height) - Added
RecordCollection
- Breaking: Changed how the resnet (not-fpn) backbone cut is done for torchvision models. Previous resnet torchvision trained models will have trouble loading weights.
Supports pytorch 1.8
iou_thresholds
parameter toCOCOMetric
SimpleConfusionMatrix
Metric- Negative samples support for mmdetection object detection models
- Breaking: Albumentations
aug_tfms
defaults.- rotate_limit changed from 45 to 15
- rgb_shift_limit changed from 20 to 10
- VOC parser uses image sizes from annotation file instead of image
- bumps fastai to latest version (<2.4)
BREAKING: API Refactor
- Metrics for mmdetection models
- Breaking: Renamed tasks
default,detect,classif
tocommon,detection,classification
- Breaking: Renamed
imageid
torecord_id
- Breaking: Added parameter
is_new
toParser.parse_fields
- Removed all dependencies on
cv2
for visualisation - Use new composite API for visualisation - covers user defined task names & multiple tasks
- Added a ton of visualisation goodies to
icevision.visualize.draw_data.draw_sample
- user can now- use custom fonts
- control mask thickness
- control mask blending
- prettify labels -- show confidence score & capitalise label
- plot specific and/or exclude specific labels
- pass in a dictionary mapping labels to specific colors
- control label height & width padding from bbox edge
- add border around label for legibility (color is a parameter)
Breaking:: Rename labels->label_ids
, labels_names->labels
in LabelsRecordComponent
- Renamed torchvision resnet backbones:
- resnet_fpn.resnet18 -> resnet18_fpn
- resnest_fpn.resnest18 -> resnest18_fpn
Breaking: Added parameters sample
and keep_image
to convert_raw_prediction
Breaking: Renamed VocXmlParser
to VOCBBoxParser
and VocMaskParser
to VOCMaskParser
Breaking: Renamed predict_dl
to predict_from_dl
- mmdetection models
- Breaking: All
Parser
subclasses need to callsuper.__init__
- Breaking:
LabelsMixin.labels
now needs to returnList[Hashable]
instead ofList[int]
(labels names instead of label ids) - Breaking: Model namespace changes e.g.
faster_rcnn
->models.torchvision.faster_rcnn
,efficientdet
->models.ross.efficientdet
- Breaking: Renamed
ClassMap.get_name/get_id
toClassMap.get_by_name/get_by_id
- Breaking: Removes
idmap
argument fromParser.parse
. Instead passidmap
to the constructor (__init__
). - ClassMap is not created inside of the parser, it's not required to instantiate it before
- class_map labels get automatically filled while parsing
- background for class_map is now always 0 (unless no background)
- adds
class_map
toRecord
aggregate_records_objects
function
- Added
label_field
to VIA parser to allow for alternateregion_attribute
names
- Keypoints full support: data API, model and training
- VGG Image Annotator v2 JSON format parser for bboxes
figsize
parameter toshow_record
andshow_sample
- improved visualisation for small bboxes
COCOMetric
now returns all metrics from pycocotools- makes torchvision models torchscriptable
- retinanet: model, dataloaders, predict, ...
- Breaking: models/rcnn renamed to models/torchvision_models
- tests/models/rcnn renamed to tests/models/torchvision_models
- pytorch 1.7 support, all dependencies updated
- tutorial with hard negative samples
- ability to skip record while parsing
- show_preds visual improvement
- Cache records after parsing with the new parameter
cache_filepath
added toParser.parse
(#504) - Added
pretrained: bool = True
argument to both faster_rcnn and mask_rcnnmodel()
methods. (#516) - new class
EncodedRLEs
- all masks get converted to
EncodedRLEs
at parsing time
- Removed warning on autofixing masks
- RLE default counts is now COCO style
- renamed
Mask.to_erle
toMask.to_erles
- updated matplotlib and ipykernel minimum version for colab compatibility
- Switched from poetry to setuptools
- Function
wandb_img_preds
to help logging bboxes to wandb - wandb as a soft dependency
- Template code for
parsers.SizeMixin
ifparsers.FilepathMixin
is used - Get image size without opening image with
get_image_size
- Ability to skip record while parsing with
AbortParseRecord
- Autofix for record:
autofix_records
function andautofix:bool
parameter added toParser.parse
- Record class and mixins,
create_mixed_record
function to help creating Records - InvalidDataError for BBox
- Catches InvalidDataError while parsing data
- Breaking: Unified
parsers.SizeMixin
functionsimage_width
andimage_height
into a single functionimage_width_height
- Rename Parser
SizeMixin
fields fromwidth
height
toimage_width
image_height
- Removed
CombinedParser
, all parsing can be done with the standardParser
- Efficientdet now support empty annotations
- Returns float instead of dict on
FastaiMetricAdapter
- Updates fastai2 to the final release version
- soft import
icedata
inicevision.all
show_pbar
parameter toCOCOMetric
- Effdet as direct dependency
show_results
function for each model
- Default
data_splitter
for Parser changed toRandomSplitter
- Renamed package from
mantisshrimp
toicevision
- Removed
datasets
module to instead use the newicedata
package
batch, samples = <model_name>.build_infer_batch(dataset)
preds = <model_name>.predict(model, batch)
infer_dl = <model_name>.infer_dataloader(dataset)
samples, preds = predict_dl(model, infer_dl)
Dataset.from_images
Contructs aDataset
from a list of images (numpy arrays)tfms.A.aug_tfms
for easy access to common augmentation transforms with albumentationstfms.A.resize_and_pad
, useful as a validation transform**predict_kwargs
topredict_dl
signaturefrom mantisshrimp.all import *
to import internal modules and external importsshow
parameter toshow_img
download_gdrive
anddownload_and_extract_gdrive
- New datasets
pennfundan
andbirds
- Renames
AlbuTransform
toAlbumentationTransforms
- All
build_batch
method now returnsbatch, samples
, the batch is always a tuple of inputs to the model batch_tfms
moved totfms.batch
AlbumentationTransforms
moved totfms.A.Adapter
- All parsers function were moved to their own namespace
parsers
instead of being on the global namespace so, for example, instead ofParser
now we have to doparsers.Parser
- Removed
Parser
word from Mixins, e.g.ImageidParserMixin
->parsers.ImageidMixin
- Removed
Parser
word from parser default bundle, e.g.FasterRCNNParser
->parsers.FasterRCNN
- COCO and VOC parsers moved from
datasets
toparsers
DataSplitter
s moved fromparsers/splits.py
toutils/data_splitter.py
- Renames
*_dataloader
to*_dl
, e.g.mask_rcnn.train_dataloader
tomask_rcnn.train_dl
- Moves
RecordType
fromparsers
tocore
- Refactors
IDMap
, adds methodsget_name
andget_id
- Moves
IDMap
fromutils
todata
DataSplitter.split
now receivesidmap
instead ofids
CaptureStdout
for capturing writes to stdout (print), e.g. from COCOMetricmantisshrimp.models.<model_name>.convert_raw_predictions
to convert raw preds (tensors output from the model) to library standard dictCOCOMetricType
for selecting what metric type to use (bbox
,mask
,keypoints
)COCOMetric
fixedsort
parameter forget_image_files
ClassMap
: A class that handles the mapping between ids and names, with the optional insertion of the background class
- All dataloaders now return the batch and the records, e.g.
return (images, targets), records
Metric.accumulate
signature changed to(records, preds)
, reflects inFastaiMetricAdapter
andLightningModelAdapter
datasets.<name>.CLASSES
substituted by a functiondatasets.<name>.class_map
that returns aClassMap
datasets.voc.VocXmlParser
,show
methods: parameterclasses: Sequence[str]
substituted byclass_map: ClassMap
datasets.fridge.parser
,datasets.pets.parser
: additional required parameterclass_map
MantisFasterRCNN
,MantisMaskRCNN
MantisEfficientDet
CategoryMap
,Category
MantisModule