discopat.nn_models.detr
Classes
|
|
|
Convert the model's output into the format expected by the coco api. |
- class discopat.nn_models.detr.DETRModel(net, label_map, model_parameters)[source]
Bases:
NNModel- Parameters:
net (NeuralNet)
label_map (dict[str, int])
model_parameters (dict)
- class discopat.nn_models.detr.PostProcess(*args, **kwargs)[source]
Bases:
ModuleConvert the model’s output into the format expected by the coco api.
- forward(outputs, target_sizes)[source]
Perform the computation.
- Parameters:
outputs (raw outputs of the model)
target_sizes (tensor of dimension [batch_size x 2] containing the size of each images of the batch) – For evaluation, this must be the original image size (before any data augmentation) For visualization, this should be the image size after data augment, but before padding