Releases: alankbi/detecto
New model name feature and bug fix
List of changes:
- Add a new
model_name
parameter tocore.Model
(#94)- The default model remains the same (
"fasterrcnn_resnet50_fpn"
, orModel.DEFAULT
) - New options include the following:
"fasterrcnn_mobilenet_v3_large_fpn"
(Model.MOBILENET
)"fasterrcnn_mobilenet_v3_large_320_fpn"
(Model.MOBILENET_320
)
- The default model remains the same (
- Fix occasional bug with drawing bounding boxes for the
detect_live
function (#101)
Different bounding box order bug fix and new pre-trained flag
Updates to Dataset behavior and model training verbosity
A few features and bug fixes are included in this release that update the behavior of the package. Most users should remain unaffected and not experience any noticeable performance differences or bugs; however, please take a look at the following change list to note everything that has been changed:
- Change
Dataset
to group objects by image when indexing (#40, #60, #62)- Previously, if an image had multiple labeled objects in it, the
Dataset
would treat each object as a separate row/index - The dimensions of
boxes
andlabels
in thetargets
dict are now(N, 4)
andN
, respectively, whereN
is the number of labeled objects in each image (labels
has changed from a string to a list of strings) - The
xml_to_csv
function now has an additional column namedimage_id
- Previously, if an image had multiple labeled objects in it, the
- Add more detailed verbose messages on calls to
model.fit
(#53)- Now, the
verbose
flag is set toTrue
- A warning is given if the user is trying to fit the model on a CPU
- Training and validation progress is shown for each epoch
- Now, the
- Pin
torch
andtorchvision
dependency versions to1.6.0
and0.7.0
, respectively (#52)
To prevent these changes from affecting existing codebases, users can lock their Detecto version to anything below 1.2.0
to ensure no breaking changes.
Fix bug with float values in XML files (fix 2)
Fix bug with float values in XML files
Fix bug with float values in XML files (#47)
Validation loss bug fix
Fixes a bug where validation loss uses the training dataset instead of the validation dataset (#38)
Add live webcam detection
Adds support for live webcam detection (#14) with the visualize.detect_live
function.
Decrease default score filter to 0.6
Given that custom-trained Detecto models often output predictions with scores of 0.6 or 0.7, the default score_filter parameter for visualize_detect_video and visualize.plot_prediction_grid has been lowered to 0.6.
To prevent this change in behavior, you can explicitly set score_filter=0.8 as follows:
from detecto import visualize
visualize.detect_video(model, 'input_vid.mp4', 'output_vid.avi', score_filter=0.8)
visualize.plot_prediction_grid(model, images, score_filter=0.8)
Visualize module improvements and changes
Summary of changes (coming from pull request #19):
- Changes behavior of detect_video and plot_prediction_grid to show all predictions above a certain threshold (optional parameter) rather than the top prediction per class
- Allows show_labeled_image to accept labels to display along with boxes
- Fixes bug when running detect_video on a default model
All changes are non-breaking.
Major updates to core module and new split_video function
Major updates to the core module make it even easier to use Detecto. In addition, a new utils.split_video function helps users generate image data from video footage.
- Split video function #12
- Increased flexibility of classes in core module #15
- Support for default pre-trained model #18
Note: for using the default model, it's recommended to wait until v1.0.1 is released, which will fix a few minor bugs and improve existing visualization methods to better support the default model's predictions.