View Source PostDNN (postdnn v0.1.0)

Post-processing utilities for Deep Neural Network.

Link to this section Summary

Functions

Create a list of coordinates for mesh grid points - top-left of each grid.

Link to this section Functions

Link to this function

mesh_grid(shape, pitches, opts \\ [])

View Source

Create a list of coordinates for mesh grid points - top-left of each grid.

parameters

Parameters

  • shape - tupple {width, height} for overall size.
  • pitches - list of grid spacing.
  • opts
    • :center - return center of each grid.

examples

Examples

  mesh_grid({416,416}, [8,16,32,64], [:center])
Link to this function

non_max_suppression_multi_class(arg, boxes, scores, opts \\ [])

View Source

Execute post processing: nms.

parameters

Parameters

  • num_boxes - number of candidate boxes
  • num_class - number of category class
  • boxes - binaries, serialized boxes tensor[num_boxes][4]; dtype: float32
  • scores - binaries, serialized score tensor[num_boxes][num_class]; dtype: float32
  • opts
    • iou_threshold: - IOU threshold
    • score_threshold: - score cutoff threshold
    • sigma: - soft IOU parameter
    • boxrepr: - type of box representation
      • 0 - center pos and width/height
      • 1 - top-left pos and width/height
      • 2 - top-left and bottom-right corner pos

examples

Examples

  non_max_suppression_multi_class(
    Nx.shape(scores), Nx.to_binary(boxes), Nx.to_binary(scores), boxrepr: :corner
  )