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.

68 lines
2.0 KiB

6 years ago
  1. syntax = "proto2";
  2. package object_detection.protos;
  3. // Message wrapper for various calibration configurations
  4. message CalibrationConfig {
  5. oneof calibrator {
  6. // Class-agnostic calibration via linear interpolation (usually output from
  7. // isotonic regression)
  8. FunctionApproximation function_approximation = 1;
  9. // Per-class calibration via linear interpolation
  10. LabelFunctionApproximations label_function_approximations = 2;
  11. // Class-agnostic sigmoid calibration
  12. SigmoidCalibration sigmoid_calibration = 3;
  13. // Per-class sigmoid calibration
  14. LabelSigmoidCalibrations label_sigmoid_calibrations = 4;
  15. }
  16. }
  17. // Message for class-agnostic domain/range mapping for function
  18. // approximations
  19. message FunctionApproximation {
  20. // Message mapping class labels to indices
  21. optional XYPairs x_y_pairs = 1;
  22. }
  23. // Message for class-specific domain/range mapping for function
  24. // approximations
  25. message LabelFunctionApproximations {
  26. // Message mapping class labels to indices
  27. map<string, XYPairs> label_xy_pairs_map = 1;
  28. // Label map to map label names from to class ids.
  29. optional string label_map_path = 2;
  30. }
  31. // Message for class-agnostic Sigmoid Calibration
  32. message SigmoidCalibration {
  33. // Message mapping class index to Sigmoid Parameters
  34. optional SigmoidParameters sigmoid_parameters = 1;
  35. }
  36. // Message for class-specific Sigmoid Calibration
  37. message LabelSigmoidCalibrations {
  38. // Message mapping class index to Sigmoid Parameters
  39. map<string, SigmoidParameters> label_sigmoid_parameters_map = 1;
  40. // Label map to map label names from to class ids.
  41. optional string label_map_path = 2;
  42. }
  43. // Message to store a domain/range pair for function to be approximated
  44. message XYPairs {
  45. message XYPair {
  46. optional float x = 1;
  47. optional float y = 2;
  48. }
  49. // Sequence of x/y pairs for function approximation
  50. repeated XYPair x_y_pair = 1;
  51. }
  52. // Message defining parameters for sigmoid calibration.
  53. message SigmoidParameters {
  54. optional float a = 1 [default = -1.0];
  55. optional float b = 2 [default = 0.0];
  56. }