You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.8 KiB

6 years ago
  1. syntax = "proto2";
  2. package object_detection.protos;
  3. import "object_detection/protos/calibration.proto";
  4. // Configuration proto for non-max-suppression operation on a batch of
  5. // detections.
  6. message BatchNonMaxSuppression {
  7. // Scalar threshold for score (low scoring boxes are removed).
  8. optional float score_threshold = 1 [default = 0.0];
  9. // Scalar threshold for IOU (boxes that have high IOU overlap
  10. // with previously selected boxes are removed).
  11. optional float iou_threshold = 2 [default = 0.6];
  12. // Maximum number of detections to retain per class.
  13. optional int32 max_detections_per_class = 3 [default = 100];
  14. // Maximum number of detections to retain across all classes.
  15. optional int32 max_total_detections = 5 [default = 100];
  16. // Whether to use the implementation of NMS that guarantees static shapes.
  17. optional bool use_static_shapes = 6 [default = false];
  18. }
  19. // Configuration proto for post-processing predicted boxes and
  20. // scores.
  21. message PostProcessing {
  22. // Non max suppression parameters.
  23. optional BatchNonMaxSuppression batch_non_max_suppression = 1;
  24. // Enum to specify how to convert the detection scores.
  25. enum ScoreConverter {
  26. // Input scores equals output scores.
  27. IDENTITY = 0;
  28. // Applies a sigmoid on input scores.
  29. SIGMOID = 1;
  30. // Applies a softmax on input scores
  31. SOFTMAX = 2;
  32. }
  33. // Score converter to use.
  34. optional ScoreConverter score_converter = 2 [default = IDENTITY];
  35. // Scale logit (input) value before conversion in post-processing step.
  36. // Typically used for softmax distillation, though can be used to scale for
  37. // other reasons.
  38. optional float logit_scale = 3 [default = 1.0];
  39. // Calibrate score outputs. Calibration is applied after score converter
  40. // and before non max suppression.
  41. optional CalibrationConfig calibration_config = 4;
  42. }