Skip to content

v0.3.0

Compare
Choose a tag to compare
@thibo73800 thibo73800 released this 16 Aug 06:00
· 384 commits to master since this release
e58b3e8

What's Changed

Features


The shortest distance between two points is a straight line. - Archimedes

As said Archimedes, knowing the distance (straight line) between camera and a point is as important as knowing planar depth. Therefore, it's convenient to have methods that can do the conversion between them

What's new ?

  • Handle negative points in encode_absolute: For wide range camera (FoV > 180), it's possible to have points whose planar depth is small than 0 (points behind camera). To keep these points instead of clipping by 0, pass keep_negative=True in argument.
  • Depth to distance as_distance(): Convert depth to distance. Only pinhole camera and linear equidistant camera are supported at this time.
  • Distance to depth as_depth(): Convert distance to depth. Only pinhole camera and linear equidistant camera are supported at this time.
  • Possible to create a tensor of Distance by passing is_distance=True at initialization.
  • Support functions in depth_utils.

Update

  • Change the term to avoid the confusion: "euclidean depth" for distance and "planar depth" for usual depth.
  • as_distance() becomes as_euclidean()
  • as_depth() becomes as_planar()

Archimedes's quote now becomes: The shortest "euclidean depth" between two points is a straight line.


New feature

  • Add projection and distortion as new properties of SpatialAugmentedTensor so that we can inherit for other types of tensor. Two projection models are supported: pinhole and equidistant. Default values are pinhole and 1.0 for distortion so it won't change anything for initialization if we are working on "pinhole" image. Only aloscene.Depth is supported for distortion and equidistant projection at this time.
  • Depth.as_points3d is now supported equidistant model with distortion. If no projection model and distortion are specified in arguments, as_points3d uses the projection and distortion property.
  • Depth.as_planar and Depth.as_euclidean now use projection and distortion property if there is no projection model and distortion specified in arguments.
  • Depth.__get_view__ now has color legend if legend is set True.

  • New 💥 :

    • TensorRt engines can now be built with int8 precision using Post Training Quantization.
    • 4 calibrators are available for quantization : MinMaxCalibrator, LegacyCalibrator, EntropyCalibrator and EntropyCalibrator2.
    • Added a QuantizedModel interface to convert model to quantized model for Training Aware Quantization.
  • Fixed 🔧 :

    • Adapt graph option is removed, we just adapt graph once it's exported from torch to ONNX.

New ⭐ :

  • profiling_verbosity option is added to the TRTEngineBuilder to better inspect the details of each node when calling the tensorrt.EngineInspector
  • Some quantization related arguments are added to the BaseTRTExporter.

  • RandomDownScale : transform to randomly downscale between original and a minimum frame size
  • RandomDownScaleCrop : a compose transform to randomly downscale then crop

  • add cuda shared memory for reccurent engines by @Data-Iab in #186

New 🌱

  • Engine's inputs/outputs can share the same space in GPU for faster execution. Hosts with shared memory can be retrieved with outputs_to_cpu argument and can be updated using inputs_to_gpu argument.

Dynamic Cropping

  • Possibility to crop an image to smaller fixed size image in the position we want. The crop position can be parsed by argument center which can be float or int.
  • If crop is out of image border, an error is triggered.

New ⭐ :

  • Depth evaluation metrics are added to alonet metrics.

  • CocoDetectionDataset can now use a given ann_file when loaded
  • CocoPanopticDataset can now use ignore_classes to ignore some classed when loading the panoptic anns
  • In DetrCriterion interpolation is an option that can be changed with upscale_interpolate
  • Lvis Dataset based on CocoDetectionDataset with a different ann file

  • allow user to complety specify the grid view by @jsalotti in #201
# Create three gray frames, display them on two rows (2 on first rows, 1 on 2nd row)
import numpy as np
import aloscene
arrays = [np.full((3, 600, 650), 100), np.full((3, 500, 500), 50), np.full((3, 500, 800), 200)]
frames = [aloscene.Frame(arr) for arr in arrays]
views = [[frames[0].get_view(), frames[1].get_view()], [frames[2].get_view()]]
aloscene.render(views, renderer="matplotlib")

Create scene flow by calling the class with a file path, a tensor or a ndarray.

If you have optical flow, depth at time T and T + 1 and the camera intrinsic. You can create scene flow with the class method from_optical_flow. It handle the creation of the occlusion mask if some parameters have one.


  • Github action who automatically launch unit test when there is a commit or pull request in master branch

  • Scene flow in frame by @Ardorax in #208
    New method 'append_scene_flow' in frame class.

Fix

  • GLOBAL_COLOR_SET_CLASS will automaticly adjust its size for giving random color for a given object class

New Contributors

Full Changelog: v0.2.1...v0.3.0