--with-apex
option toodtk train
andodtk infer
.- This parameter allows you to switch to NVIDIA APEX AMP and DistributedDataParallel.
- Adding validation stats to TensorBoard.
- Pytorch Docker container 21.09 from 20.06
- Added training and inference support for PyTorch native AMP, and torch.nn.parallel.DistributedDataParallel (default).
- Switched the Pytorch Model and Data Memory Format to Channels Last. (see Memory Format Tutorial)
- Bug fixes:
- Workaround for
'No detections!'
during vlidation added. (see #52663) - Freeze unused parameters from torchvision models from autograd gradient calculations.
- Make tensorboard writer exclusive to the master process to prevent race conditions.
- Workaround for
- Renamed instances of
retinanet
toodtk
(folder, C++ namepsaces, etc.)
--dynamic-batch-opts
option toodtk export
.- This parameter allows you to provide TensorRT Optimiation Profile batch sizes for engine export (min, opt, max).
- Updated TensorRT plugins to allow for dynamic batch sizes (see https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#work_dynamic_shapes and https://docs.nvidia.com/deeplearning/tensorrt/api/c_api/classnvinfer1_1_1_i_plugin_v2_dynamic_ext.html).
--anchor-ious
option toodtk train
.- This parameter allows you to adjust the background and foreground anchor IoU threshold. The default values are
[0.4, 0.5].
- Example
--anchor-ious 0.3 0.5
. This would mean that any anchor with an IoU of less than 0.3 is assigned to background, and that any anchor with an IoU of greater than 0.5 is assigned to the foreground object, which is atmost one.
- This parameter allows you to adjust the background and foreground anchor IoU threshold. The default values are
MobileNetV2FPN
backbone
- Rotated bounding box detections models can now be exported to ONNX and TensorRT using
odtk export model.pth model.plan --rotated-bbox
- The
--rotated-bbox
flag is automatically applied when runningodtk infer
orodtk export
on a model trained with ODTK version 0.2.2 or later.
- Improvements to the rotated IoU calculations.
- The C++ API cannot currently infer rotated bounding box models.
- The DALI dataloader (flag
--with-dali
) now supports image augmentation using:--augment-brightness
: Randomly adjusts brightness of image--augment-contrast
: Randomly adjusts contrast of image--augment-hue
: Randomly adjusts hue of image--augment-saturation
: Randomly adjusts saturation of image
- The code in
box.py
for generating anchors has been improved.
Version 0.2.0 introduces rotated detections.
train arguments
:--rotated-bbox
: Trains a model is predict rotated bounding boxes[x, y, w, h, theta]
instead of axis aligned boxes[x, y, w, h]
.
infer arguments
:--rotated-bbox
: Infer a rotated model.
The project has reverted to the name Object Detection Toolkit (ODTK), to better reflect the multi-network nature of the repo.
retinanet
has been replaced withodtk
. All subcommands remain the same.
- Models trained using the
--rotated-bbox
flag cannot be exported to ONNX or a TensorRT Engine. - PyTorch raises two warnings which can be ignored:
Warning 1: NCCL watchdog
[E ProcessGroupNCCL.cpp:284] NCCL watchdog thread terminated
Warning 2: Save state warning
/opt/conda/lib/python3.6/site-packages/torch/optim/lr_scheduler.py:201: UserWarning: Please also save or load the state of the optimzer when saving or loading the scheduler.
warnings.warn(SAVE_STATE_WARNING, UserWarning)
train
arguments--augment-rotate
: Randomly rotates the training images by 0°, 90°, 180° or 270°.--augment-brightness
: Randomly adjusts brightness of image--augment-contrast
: Randomly adjusts contrast of image--augment-hue
: Randomly adjusts hue of image--augment-saturation
: Randomly adjusts saturation of image--regularization-l2
: Sets the L2 regularization of the optimizer.