discopat.nn_models
- class discopat.nn_models.FasterRCNNModel(net, label_map, model_parameters)[source]
Bases:
NNModel- Parameters:
net (NeuralNet)
label_map (dict[str, int])
model_parameters (dict)
- make_box_from_tensors(box_xyxy, label, score)[source]
- Parameters:
box_xyxy (Tensor)
label (Tensor)
score (Tensor)
- Return type:
- post_process(raw_predictions)[source]
Adapt the internal detector’s predictions to discopat’s format.
- Parameters:
raw_predictions (list[dict[Tensor]])
- Return type:
list[Box]
- pre_process(frame)[source]
Prepare the frame’s array to pass through the internal detector.
Can be a neural net, a convolutional sparse encoder…
- Parameters:
frame (Frame)
- Return type:
Tensor
- property reversed_label_map
- set_device(device)[source]
- Parameters:
device (ComputingDevice)
- Return type:
None
Modules
Utilities for bounding box manipulation and GIoU. |