text: // Generated by the protocol buffer compiler.  DO NOT EDIT!
  // source: object_detection/protos/region_similarity_calculator.proto
  
  #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
  #include "object_detection/protos/region_similarity_calculator.pb.h"
  
  #include <algorithm>
  
  #include <google/protobuf/stubs/common.h>
  #include <google/protobuf/stubs/port.h>
  #include <google/protobuf/stubs/once.h>
  #include <google/protobuf/io/coded_stream.h>
  #include <google/protobuf/wire_format_lite_inl.h>
  #include <google/protobuf/descriptor.h>
  #include <google/protobuf/generated_message_reflection.h>
  #include <google/protobuf/reflection_ops.h>
  #include <google/protobuf/wire_format.h>
  // @@protoc_insertion_point(includes)
  
  namespace object_detection {
  namespace protos {
  class RegionSimilarityCalculatorDefaultTypeInternal {
  public:
   ::google::protobuf::internal::ExplicitlyConstructed<RegionSimilarityCalculator>
       _instance;
    const ::object_detection::protos::NegSqDistSimilarity* neg_sq_dist_similarity_;
    const ::object_detection::protos::IouSimilarity* iou_similarity_;
    const ::object_detection::protos::IoaSimilarity* ioa_similarity_;
    const ::object_detection::protos::ThresholdedIouSimilarity* thresholded_iou_similarity_;
  } _RegionSimilarityCalculator_default_instance_;
  class NegSqDistSimilarityDefaultTypeInternal {
  public:
   ::google::protobuf::internal::ExplicitlyConstructed<NegSqDistSimilarity>
       _instance;
  } _NegSqDistSimilarity_default_instance_;
  class IouSimilarityDefaultTypeInternal {
  public:
   ::google::protobuf::internal::ExplicitlyConstructed<IouSimilarity>
       _instance;
  } _IouSimilarity_default_instance_;
  class IoaSimilarityDefaultTypeInternal {
  public:
   ::google::protobuf::internal::ExplicitlyConstructed<IoaSimilarity>
       _instance;
  } _IoaSimilarity_default_instance_;
  class ThresholdedIouSimilarityDefaultTypeInternal {
  public:
   ::google::protobuf::internal::ExplicitlyConstructed<ThresholdedIouSimilarity>
       _instance;
  } _ThresholdedIouSimilarity_default_instance_;
  
  namespace protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto {
  
  
  namespace {
  
  ::google::protobuf::Metadata file_level_metadata[5];
  
  }  // namespace
  
  PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField
      const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
    {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0},
  };
  
  PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField
      const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
    ::google::protobuf::internal::AuxillaryParseTableField(),
  };
  PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const
      TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
    { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
    { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
    { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
    { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
    { NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
  };
  
  const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegionSimilarityCalculator, _has_bits_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegionSimilarityCalculator, _internal_metadata_),
    ~0u,  // no _extensions_
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegionSimilarityCalculator, _oneof_case_[0]),
    ~0u,  // no _weak_field_map_
    offsetof(RegionSimilarityCalculatorDefaultTypeInternal, neg_sq_dist_similarity_),
    offsetof(RegionSimilarityCalculatorDefaultTypeInternal, iou_similarity_),
    offsetof(RegionSimilarityCalculatorDefaultTypeInternal, ioa_similarity_),
    offsetof(RegionSimilarityCalculatorDefaultTypeInternal, thresholded_iou_similarity_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegionSimilarityCalculator, region_similarity_),
    ~0u,
    ~0u,
    ~0u,
    ~0u,
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NegSqDistSimilarity, _has_bits_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NegSqDistSimilarity, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IouSimilarity, _has_bits_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IouSimilarity, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IoaSimilarity, _has_bits_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(IoaSimilarity, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThresholdedIouSimilarity, _has_bits_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThresholdedIouSimilarity, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThresholdedIouSimilarity, iou_threshold_),
    0,
  };
  static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
    { 0, 10, sizeof(RegionSimilarityCalculator)},
    { 14, 19, sizeof(NegSqDistSimilarity)},
    { 19, 24, sizeof(IouSimilarity)},
    { 24, 29, sizeof(IoaSimilarity)},
    { 29, 35, sizeof(ThresholdedIouSimilarity)},
  };
  
  static ::google::protobuf::Message const * const file_default_instances[] = {
    reinterpret_cast<const ::google::protobuf::Message*>(&_RegionSimilarityCalculator_default_instance_),
    reinterpret_cast<const ::google::protobuf::Message*>(&_NegSqDistSimilarity_default_instance_),
    reinterpret_cast<const ::google::protobuf::Message*>(&_IouSimilarity_default_instance_),
    reinterpret_cast<const ::google::protobuf::Message*>(&_IoaSimilarity_default_instance_),
    reinterpret_cast<const ::google::protobuf::Message*>(&_ThresholdedIouSimilarity_default_instance_),
  };
  
  namespace {
  
  void protobuf_AssignDescriptors() {
    AddDescriptors();
    ::google::protobuf::MessageFactory* factory = NULL;
    AssignDescriptors(
        "object_detection/protos/region_similarity_calculator.proto", schemas, file_default_instances, TableStruct::offsets, factory,
        file_level_metadata, NULL, NULL);
  }
  
  void protobuf_AssignDescriptorsOnce() {
    static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
    ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  }
  
  void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
  void protobuf_RegisterTypes(const ::std::string&) {
    protobuf_AssignDescriptorsOnce();
    ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
  }
  
  }  // namespace
  void TableStruct::InitDefaultsImpl() {
    GOOGLE_PROTOBUF_VERIFY_VERSION;
  
    ::google::protobuf::internal::InitProtobufDefaults();
    _RegionSimilarityCalculator_default_instance_._instance.DefaultConstruct();
    ::google::protobuf::internal::OnShutdownDestroyMessage(
        &_RegionSimilarityCalculator_default_instance_);_NegSqDistSimilarity_default_instance_._instance.DefaultConstruct();
    ::google::protobuf::internal::OnShutdownDestroyMessage(
        &_NegSqDistSimilarity_default_instance_);_IouSimilarity_default_instance_._instance.DefaultConstruct();
    ::google::protobuf::internal::OnShutdownDestroyMessage(
        &_IouSimilarity_default_instance_);_IoaSimilarity_default_instance_._instance.DefaultConstruct();
    ::google::protobuf::internal::OnShutdownDestroyMessage(
        &_IoaSimilarity_default_instance_);_ThresholdedIouSimilarity_default_instance_._instance.DefaultConstruct();
    ::google::protobuf::internal::OnShutdownDestroyMessage(
        &_ThresholdedIouSimilarity_default_instance_);_RegionSimilarityCalculator_default_instance_.neg_sq_dist_similarity_ = const_cast< ::object_detection::protos::NegSqDistSimilarity*>(
        ::object_detection::protos::NegSqDistSimilarity::internal_default_instance());
    _RegionSimilarityCalculator_default_instance_.iou_similarity_ = const_cast< ::object_detection::protos::IouSimilarity*>(
        ::object_detection::protos::IouSimilarity::internal_default_instance());
    _RegionSimilarityCalculator_default_instance_.ioa_similarity_ = const_cast< ::object_detection::protos::IoaSimilarity*>(
        ::object_detection::protos::IoaSimilarity::internal_default_instance());
    _RegionSimilarityCalculator_default_instance_.thresholded_iou_similarity_ = const_cast< ::object_detection::protos::ThresholdedIouSimilarity*>(
        ::object_detection::protos::ThresholdedIouSimilarity::internal_default_instance());
  }
  
  void InitDefaults() {
    static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
    ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl);
  }
  namespace {
  void AddDescriptorsImpl() {
    InitDefaults();
    static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
        "\n:object_detection/protos/region_similar"
        "ity_calculator.proto\022\027object_detection.p"
        "rotos\"\336\002\n\032RegionSimilarityCalculator\022N\n\026"
        "neg_sq_dist_similarity\030\001 \001(\0132,.object_de"
        "tection.protos.NegSqDistSimilarityH\000\022@\n\016"
        "iou_similarity\030\002 \001(\0132&.object_detection."
        "protos.IouSimilarityH\000\022@\n\016ioa_similarity"
        "\030\003 \001(\0132&.object_detection.protos.IoaSimi"
        "larityH\000\022W\n\032thresholded_iou_similarity\030\004"
        " \001(\01321.object_detection.protos.Threshold"
        "edIouSimilarityH\000B\023\n\021region_similarity\"\025"
        "\n\023NegSqDistSimilarity\"\017\n\rIouSimilarity\"\017"
        "\n\rIoaSimilarity\"6\n\030ThresholdedIouSimilar"
        "ity\022\032\n\riou_threshold\030\001 \001(\002:\0030.5"
    };
    ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
        descriptor, 551);
    ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
      "object_detection/protos/region_similarity_calculator.proto", &protobuf_RegisterTypes);
  }
  } // anonymous namespace
  
  void AddDescriptors() {
    static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
    ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  }
  // Force AddDescriptors() to be called at dynamic initialization time.
  struct StaticDescriptorInitializer {
    StaticDescriptorInitializer() {
      AddDescriptors();
    }
  } static_descriptor_initializer;
  
  }  // namespace protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto
  
  
  // ===================================================================
  
  #if !defined(_MSC_VER) || _MSC_VER >= 1900
  const int RegionSimilarityCalculator::kNegSqDistSimilarityFieldNumber;
  const int RegionSimilarityCalculator::kIouSimilarityFieldNumber;
  const int RegionSimilarityCalculator::kIoaSimilarityFieldNumber;
  const int RegionSimilarityCalculator::kThresholdedIouSimilarityFieldNumber;
  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
  
  RegionSimilarityCalculator::RegionSimilarityCalculator()
    : ::google::protobuf::Message(), _internal_metadata_(NULL) {
    if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
      protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::InitDefaults();
    }
    SharedCtor();
    // @@protoc_insertion_point(constructor:object_detection.protos.RegionSimilarityCalculator)
  }
  RegionSimilarityCalculator::RegionSimilarityCalculator(const RegionSimilarityCalculator& from)
    : ::google::protobuf::Message(),
        _internal_metadata_(NULL),
        _has_bits_(from._has_bits_),
        _cached_size_(0) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    clear_has_region_similarity();
    switch (from.region_similarity_case()) {
      case kNegSqDistSimilarity: {
        mutable_neg_sq_dist_similarity()->::object_detection::protos::NegSqDistSimilarity::MergeFrom(from.neg_sq_dist_similarity());
        break;
      }
      case kIouSimilarity: {
        mutable_iou_similarity()->::object_detection::protos::IouSimilarity::MergeFrom(from.iou_similarity());
        break;
      }
      case kIoaSimilarity: {
        mutable_ioa_similarity()->::object_detection::protos::IoaSimilarity::MergeFrom(from.ioa_similarity());
        break;
      }
      case kThresholdedIouSimilarity: {
        mutable_thresholded_iou_similarity()->::object_detection::protos::ThresholdedIouSimilarity::MergeFrom(from.thresholded_iou_similarity());
        break;
      }
      case REGION_SIMILARITY_NOT_SET: {
        break;
      }
    }
    // @@protoc_insertion_point(copy_constructor:object_detection.protos.RegionSimilarityCalculator)
  }
  
  void RegionSimilarityCalculator::SharedCtor() {
    _cached_size_ = 0;
    clear_has_region_similarity();
  }
  
  RegionSimilarityCalculator::~RegionSimilarityCalculator() {
    // @@protoc_insertion_point(destructor:object_detection.protos.RegionSimilarityCalculator)
    SharedDtor();
  }
  
  void RegionSimilarityCalculator::SharedDtor() {
    if (has_region_similarity()) {
      clear_region_similarity();
    }
  }
  
  void RegionSimilarityCalculator::SetCachedSize(int size) const {
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _cached_size_ = size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
  }
  const ::google::protobuf::Descriptor* RegionSimilarityCalculator::descriptor() {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::protobuf_AssignDescriptorsOnce();
    return protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  }
  
  const RegionSimilarityCalculator& RegionSimilarityCalculator::default_instance() {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::InitDefaults();
    return *internal_default_instance();
  }
  
  RegionSimilarityCalculator* RegionSimilarityCalculator::New(::google::protobuf::Arena* arena) const {
    RegionSimilarityCalculator* n = new RegionSimilarityCalculator;
    if (arena != NULL) {
      arena->Own(n);
    }
    return n;
  }
  
  void RegionSimilarityCalculator::clear_region_similarity() {
  // @@protoc_insertion_point(one_of_clear_start:object_detection.protos.RegionSimilarityCalculator)
    switch (region_similarity_case()) {
      case kNegSqDistSimilarity: {
        delete region_similarity_.neg_sq_dist_similarity_;
        break;
      }
      case kIouSimilarity: {
        delete region_similarity_.iou_similarity_;
        break;
      }
      case kIoaSimilarity: {
        delete region_similarity_.ioa_similarity_;
        break;
      }
      case kThresholdedIouSimilarity: {
        delete region_similarity_.thresholded_iou_similarity_;
        break;
      }
      case REGION_SIMILARITY_NOT_SET: {
        break;
      }
    }
    _oneof_case_[0] = REGION_SIMILARITY_NOT_SET;
  }
  
  
  void RegionSimilarityCalculator::Clear() {
  // @@protoc_insertion_point(message_clear_start:object_detection.protos.RegionSimilarityCalculator)
    ::google::protobuf::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    clear_region_similarity();
    _has_bits_.Clear();
    _internal_metadata_.Clear();
  }
  
  bool RegionSimilarityCalculator::MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) {
  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
    ::google::protobuf::uint32 tag;
    // @@protoc_insertion_point(parse_start:object_detection.protos.RegionSimilarityCalculator)
    for (;;) {
      ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
      tag = p.first;
      if (!p.second) goto handle_unusual;
      switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
        // optional .object_detection.protos.NegSqDistSimilarity neg_sq_dist_similarity = 1;
        case 1: {
          if (static_cast< ::google::protobuf::uint8>(tag) ==
              static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
            DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                 input, mutable_neg_sq_dist_similarity()));
          } else {
            goto handle_unusual;
          }
          break;
        }
  
        // optional .object_detection.protos.IouSimilarity iou_similarity = 2;
        case 2: {
          if (static_cast< ::google::protobuf::uint8>(tag) ==
              static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
            DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                 input, mutable_iou_similarity()));
          } else {
            goto handle_unusual;
          }
          break;
        }
  
        // optional .object_detection.protos.IoaSimilarity ioa_similarity = 3;
        case 3: {
          if (static_cast< ::google::protobuf::uint8>(tag) ==
              static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
            DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                 input, mutable_ioa_similarity()));
          } else {
            goto handle_unusual;
          }
          break;
        }
  
        // optional .object_detection.protos.ThresholdedIouSimilarity thresholded_iou_similarity = 4;
        case 4: {
          if (static_cast< ::google::protobuf::uint8>(tag) ==
              static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
            DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                 input, mutable_thresholded_iou_similarity()));
          } else {
            goto handle_unusual;
          }
          break;
        }
  
        default: {
        handle_unusual:
          if (tag == 0) {
            goto success;
          }
          DO_(::google::protobuf::internal::WireFormat::SkipField(
                input, tag, _internal_metadata_.mutable_unknown_fields()));
          break;
        }
      }
    }
  success:
    // @@protoc_insertion_point(parse_success:object_detection.protos.RegionSimilarityCalculator)
    return true;
  failure:
    // @@protoc_insertion_point(parse_failure:object_detection.protos.RegionSimilarityCalculator)
    return false;
  #undef DO_
  }
  
  void RegionSimilarityCalculator::SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const {
    // @@protoc_insertion_point(serialize_start:object_detection.protos.RegionSimilarityCalculator)
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    switch (region_similarity_case()) {
      case kNegSqDistSimilarity:
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
          1, *region_similarity_.neg_sq_dist_similarity_, output);
        break;
      case kIouSimilarity:
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
          2, *region_similarity_.iou_similarity_, output);
        break;
      case kIoaSimilarity:
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
          3, *region_similarity_.ioa_similarity_, output);
        break;
      case kThresholdedIouSimilarity:
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
          4, *region_similarity_.thresholded_iou_similarity_, output);
        break;
      default: ;
    }
    if (_internal_metadata_.have_unknown_fields()) {
      ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
          _internal_metadata_.unknown_fields(), output);
    }
    // @@protoc_insertion_point(serialize_end:object_detection.protos.RegionSimilarityCalculator)
  }
  
  ::google::protobuf::uint8* RegionSimilarityCalculator::InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const {
    (void)deterministic; // Unused
    // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.RegionSimilarityCalculator)
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    switch (region_similarity_case()) {
      case kNegSqDistSimilarity:
        target = ::google::protobuf::internal::WireFormatLite::
          InternalWriteMessageNoVirtualToArray(
            1, *region_similarity_.neg_sq_dist_similarity_, deterministic, target);
        break;
      case kIouSimilarity:
        target = ::google::protobuf::internal::WireFormatLite::
          InternalWriteMessageNoVirtualToArray(
            2, *region_similarity_.iou_similarity_, deterministic, target);
        break;
      case kIoaSimilarity:
        target = ::google::protobuf::internal::WireFormatLite::
          InternalWriteMessageNoVirtualToArray(
            3, *region_similarity_.ioa_similarity_, deterministic, target);
        break;
      case kThresholdedIouSimilarity:
        target = ::google::protobuf::internal::WireFormatLite::
          InternalWriteMessageNoVirtualToArray(
            4, *region_similarity_.thresholded_iou_similarity_, deterministic, target);
        break;
      default: ;
    }
    if (_internal_metadata_.have_unknown_fields()) {
      target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target);
    }
    // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.RegionSimilarityCalculator)
    return target;
  }
  
  size_t RegionSimilarityCalculator::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:object_detection.protos.RegionSimilarityCalculator)
    size_t total_size = 0;
  
    if (_internal_metadata_.have_unknown_fields()) {
      total_size +=
        ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
          _internal_metadata_.unknown_fields());
    }
    switch (region_similarity_case()) {
      // optional .object_detection.protos.NegSqDistSimilarity neg_sq_dist_similarity = 1;
      case kNegSqDistSimilarity: {
        total_size += 1 +
          ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
            *region_similarity_.neg_sq_dist_similarity_);
        break;
      }
      // optional .object_detection.protos.IouSimilarity iou_similarity = 2;
      case kIouSimilarity: {
        total_size += 1 +
          ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
            *region_similarity_.iou_similarity_);
        break;
      }
      // optional .object_detection.protos.IoaSimilarity ioa_similarity = 3;
      case kIoaSimilarity: {
        total_size += 1 +
          ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
            *region_similarity_.ioa_similarity_);
        break;
      }
      // optional .object_detection.protos.ThresholdedIouSimilarity thresholded_iou_similarity = 4;
      case kThresholdedIouSimilarity: {
        total_size += 1 +
          ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
            *region_similarity_.thresholded_iou_similarity_);
        break;
      }
      case REGION_SIMILARITY_NOT_SET: {
        break;
      }
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _cached_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    return total_size;
  }
  
  void RegionSimilarityCalculator::MergeFrom(const ::google::protobuf::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:object_detection.protos.RegionSimilarityCalculator)
    GOOGLE_DCHECK_NE(&from, this);
    const RegionSimilarityCalculator* source =
        ::google::protobuf::internal::DynamicCastToGenerated<const RegionSimilarityCalculator>(
            &from);
    if (source == NULL) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:object_detection.protos.RegionSimilarityCalculator)
      ::google::protobuf::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:object_detection.protos.RegionSimilarityCalculator)
      MergeFrom(*source);
    }
  }
  
  void RegionSimilarityCalculator::MergeFrom(const RegionSimilarityCalculator& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.RegionSimilarityCalculator)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    switch (from.region_similarity_case()) {
      case kNegSqDistSimilarity: {
        mutable_neg_sq_dist_similarity()->::object_detection::protos::NegSqDistSimilarity::MergeFrom(from.neg_sq_dist_similarity());
        break;
      }
      case kIouSimilarity: {
        mutable_iou_similarity()->::object_detection::protos::IouSimilarity::MergeFrom(from.iou_similarity());
        break;
      }
      case kIoaSimilarity: {
        mutable_ioa_similarity()->::object_detection::protos::IoaSimilarity::MergeFrom(from.ioa_similarity());
        break;
      }
      case kThresholdedIouSimilarity: {
        mutable_thresholded_iou_similarity()->::object_detection::protos::ThresholdedIouSimilarity::MergeFrom(from.thresholded_iou_similarity());
        break;
      }
      case REGION_SIMILARITY_NOT_SET: {
        break;
      }
    }
  }
  
  void RegionSimilarityCalculator::CopyFrom(const ::google::protobuf::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:object_detection.protos.RegionSimilarityCalculator)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void RegionSimilarityCalculator::CopyFrom(const RegionSimilarityCalculator& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.RegionSimilarityCalculator)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool RegionSimilarityCalculator::IsInitialized() const {
    return true;
  }
  
  void RegionSimilarityCalculator::Swap(RegionSimilarityCalculator* other) {
    if (other == this) return;
    InternalSwap(other);
  }
  void RegionSimilarityCalculator::InternalSwap(RegionSimilarityCalculator* other) {
    using std::swap;
    swap(region_similarity_, other->region_similarity_);
    swap(_oneof_case_[0], other->_oneof_case_[0]);
    swap(_has_bits_[0], other->_has_bits_[0]);
    _internal_metadata_.Swap(&other->_internal_metadata_);
    swap(_cached_size_, other->_cached_size_);
  }
  
  ::google::protobuf::Metadata RegionSimilarityCalculator::GetMetadata() const {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::protobuf_AssignDescriptorsOnce();
    return protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::file_level_metadata[kIndexInFileMessages];
  }
  
  #if PROTOBUF_INLINE_NOT_IN_HEADERS
  // RegionSimilarityCalculator
  
  // optional .object_detection.protos.NegSqDistSimilarity neg_sq_dist_similarity = 1;
  bool RegionSimilarityCalculator::has_neg_sq_dist_similarity() const {
    return region_similarity_case() == kNegSqDistSimilarity;
  }
  void RegionSimilarityCalculator::set_has_neg_sq_dist_similarity() {
    _oneof_case_[0] = kNegSqDistSimilarity;
  }
  void RegionSimilarityCalculator::clear_neg_sq_dist_similarity() {
    if (has_neg_sq_dist_similarity()) {
      delete region_similarity_.neg_sq_dist_similarity_;
      clear_has_region_similarity();
    }
  }
   const ::object_detection::protos::NegSqDistSimilarity& RegionSimilarityCalculator::neg_sq_dist_similarity() const {
    // @@protoc_insertion_point(field_get:object_detection.protos.RegionSimilarityCalculator.neg_sq_dist_similarity)
    return has_neg_sq_dist_similarity()
        ? *region_similarity_.neg_sq_dist_similarity_
        : ::object_detection::protos::NegSqDistSimilarity::default_instance();
  }
  ::object_detection::protos::NegSqDistSimilarity* RegionSimilarityCalculator::mutable_neg_sq_dist_similarity() {
    if (!has_neg_sq_dist_similarity()) {
      clear_region_similarity();
      set_has_neg_sq_dist_similarity();
      region_similarity_.neg_sq_dist_similarity_ = new ::object_detection::protos::NegSqDistSimilarity;
    }
    // @@protoc_insertion_point(field_mutable:object_detection.protos.RegionSimilarityCalculator.neg_sq_dist_similarity)
    return region_similarity_.neg_sq_dist_similarity_;
  }
  ::object_detection::protos::NegSqDistSimilarity* RegionSimilarityCalculator::release_neg_sq_dist_similarity() {
    // @@protoc_insertion_point(field_release:object_detection.protos.RegionSimilarityCalculator.neg_sq_dist_similarity)
    if (has_neg_sq_dist_similarity()) {
      clear_has_region_similarity();
      ::object_detection::protos::NegSqDistSimilarity* temp = region_similarity_.neg_sq_dist_similarity_;
      region_similarity_.neg_sq_dist_similarity_ = NULL;
      return temp;
    } else {
      return NULL;
    }
  }
  void RegionSimilarityCalculator::set_allocated_neg_sq_dist_similarity(::object_detection::protos::NegSqDistSimilarity* neg_sq_dist_similarity) {
    clear_region_similarity();
    if (neg_sq_dist_similarity) {
      set_has_neg_sq_dist_similarity();
      region_similarity_.neg_sq_dist_similarity_ = neg_sq_dist_similarity;
    }
    // @@protoc_insertion_point(field_set_allocated:object_detection.protos.RegionSimilarityCalculator.neg_sq_dist_similarity)
  }
  
  // optional .object_detection.protos.IouSimilarity iou_similarity = 2;
  bool RegionSimilarityCalculator::has_iou_similarity() const {
    return region_similarity_case() == kIouSimilarity;
  }
  void RegionSimilarityCalculator::set_has_iou_similarity() {
    _oneof_case_[0] = kIouSimilarity;
  }
  void RegionSimilarityCalculator::clear_iou_similarity() {
    if (has_iou_similarity()) {
      delete region_similarity_.iou_similarity_;
      clear_has_region_similarity();
    }
  }
   const ::object_detection::protos::IouSimilarity& RegionSimilarityCalculator::iou_similarity() const {
    // @@protoc_insertion_point(field_get:object_detection.protos.RegionSimilarityCalculator.iou_similarity)
    return has_iou_similarity()
        ? *region_similarity_.iou_similarity_
        : ::object_detection::protos::IouSimilarity::default_instance();
  }
  ::object_detection::protos::IouSimilarity* RegionSimilarityCalculator::mutable_iou_similarity() {
    if (!has_iou_similarity()) {
      clear_region_similarity();
      set_has_iou_similarity();
      region_similarity_.iou_similarity_ = new ::object_detection::protos::IouSimilarity;
    }
    // @@protoc_insertion_point(field_mutable:object_detection.protos.RegionSimilarityCalculator.iou_similarity)
    return region_similarity_.iou_similarity_;
  }
  ::object_detection::protos::IouSimilarity* RegionSimilarityCalculator::release_iou_similarity() {
    // @@protoc_insertion_point(field_release:object_detection.protos.RegionSimilarityCalculator.iou_similarity)
    if (has_iou_similarity()) {
      clear_has_region_similarity();
      ::object_detection::protos::IouSimilarity* temp = region_similarity_.iou_similarity_;
      region_similarity_.iou_similarity_ = NULL;
      return temp;
    } else {
      return NULL;
    }
  }
  void RegionSimilarityCalculator::set_allocated_iou_similarity(::object_detection::protos::IouSimilarity* iou_similarity) {
    clear_region_similarity();
    if (iou_similarity) {
      set_has_iou_similarity();
      region_similarity_.iou_similarity_ = iou_similarity;
    }
    // @@protoc_insertion_point(field_set_allocated:object_detection.protos.RegionSimilarityCalculator.iou_similarity)
  }
  
  // optional .object_detection.protos.IoaSimilarity ioa_similarity = 3;
  bool RegionSimilarityCalculator::has_ioa_similarity() const {
    return region_similarity_case() == kIoaSimilarity;
  }
  void RegionSimilarityCalculator::set_has_ioa_similarity() {
    _oneof_case_[0] = kIoaSimilarity;
  }
  void RegionSimilarityCalculator::clear_ioa_similarity() {
    if (has_ioa_similarity()) {
      delete region_similarity_.ioa_similarity_;
      clear_has_region_similarity();
    }
  }
   const ::object_detection::protos::IoaSimilarity& RegionSimilarityCalculator::ioa_similarity() const {
    // @@protoc_insertion_point(field_get:object_detection.protos.RegionSimilarityCalculator.ioa_similarity)
    return has_ioa_similarity()
        ? *region_similarity_.ioa_similarity_
        : ::object_detection::protos::IoaSimilarity::default_instance();
  }
  ::object_detection::protos::IoaSimilarity* RegionSimilarityCalculator::mutable_ioa_similarity() {
    if (!has_ioa_similarity()) {
      clear_region_similarity();
      set_has_ioa_similarity();
      region_similarity_.ioa_similarity_ = new ::object_detection::protos::IoaSimilarity;
    }
    // @@protoc_insertion_point(field_mutable:object_detection.protos.RegionSimilarityCalculator.ioa_similarity)
    return region_similarity_.ioa_similarity_;
  }
  ::object_detection::protos::IoaSimilarity* RegionSimilarityCalculator::release_ioa_similarity() {
    // @@protoc_insertion_point(field_release:object_detection.protos.RegionSimilarityCalculator.ioa_similarity)
    if (has_ioa_similarity()) {
      clear_has_region_similarity();
      ::object_detection::protos::IoaSimilarity* temp = region_similarity_.ioa_similarity_;
      region_similarity_.ioa_similarity_ = NULL;
      return temp;
    } else {
      return NULL;
    }
  }
  void RegionSimilarityCalculator::set_allocated_ioa_similarity(::object_detection::protos::IoaSimilarity* ioa_similarity) {
    clear_region_similarity();
    if (ioa_similarity) {
      set_has_ioa_similarity();
      region_similarity_.ioa_similarity_ = ioa_similarity;
    }
    // @@protoc_insertion_point(field_set_allocated:object_detection.protos.RegionSimilarityCalculator.ioa_similarity)
  }
  
  // optional .object_detection.protos.ThresholdedIouSimilarity thresholded_iou_similarity = 4;
  bool RegionSimilarityCalculator::has_thresholded_iou_similarity() const {
    return region_similarity_case() == kThresholdedIouSimilarity;
  }
  void RegionSimilarityCalculator::set_has_thresholded_iou_similarity() {
    _oneof_case_[0] = kThresholdedIouSimilarity;
  }
  void RegionSimilarityCalculator::clear_thresholded_iou_similarity() {
    if (has_thresholded_iou_similarity()) {
      delete region_similarity_.thresholded_iou_similarity_;
      clear_has_region_similarity();
    }
  }
   const ::object_detection::protos::ThresholdedIouSimilarity& RegionSimilarityCalculator::thresholded_iou_similarity() const {
    // @@protoc_insertion_point(field_get:object_detection.protos.RegionSimilarityCalculator.thresholded_iou_similarity)
    return has_thresholded_iou_similarity()
        ? *region_similarity_.thresholded_iou_similarity_
        : ::object_detection::protos::ThresholdedIouSimilarity::default_instance();
  }
  ::object_detection::protos::ThresholdedIouSimilarity* RegionSimilarityCalculator::mutable_thresholded_iou_similarity() {
    if (!has_thresholded_iou_similarity()) {
      clear_region_similarity();
      set_has_thresholded_iou_similarity();
      region_similarity_.thresholded_iou_similarity_ = new ::object_detection::protos::ThresholdedIouSimilarity;
    }
    // @@protoc_insertion_point(field_mutable:object_detection.protos.RegionSimilarityCalculator.thresholded_iou_similarity)
    return region_similarity_.thresholded_iou_similarity_;
  }
  ::object_detection::protos::ThresholdedIouSimilarity* RegionSimilarityCalculator::release_thresholded_iou_similarity() {
    // @@protoc_insertion_point(field_release:object_detection.protos.RegionSimilarityCalculator.thresholded_iou_similarity)
    if (has_thresholded_iou_similarity()) {
      clear_has_region_similarity();
      ::object_detection::protos::ThresholdedIouSimilarity* temp = region_similarity_.thresholded_iou_similarity_;
      region_similarity_.thresholded_iou_similarity_ = NULL;
      return temp;
    } else {
      return NULL;
    }
  }
  void RegionSimilarityCalculator::set_allocated_thresholded_iou_similarity(::object_detection::protos::ThresholdedIouSimilarity* thresholded_iou_similarity) {
    clear_region_similarity();
    if (thresholded_iou_similarity) {
      set_has_thresholded_iou_similarity();
      region_similarity_.thresholded_iou_similarity_ = thresholded_iou_similarity;
    }
    // @@protoc_insertion_point(field_set_allocated:object_detection.protos.RegionSimilarityCalculator.thresholded_iou_similarity)
  }
  
  bool RegionSimilarityCalculator::has_region_similarity() const {
    return region_similarity_case() != REGION_SIMILARITY_NOT_SET;
  }
  void RegionSimilarityCalculator::clear_has_region_similarity() {
    _oneof_case_[0] = REGION_SIMILARITY_NOT_SET;
  }
  RegionSimilarityCalculator::RegionSimilarityCase RegionSimilarityCalculator::region_similarity_case() const {
    return RegionSimilarityCalculator::RegionSimilarityCase(_oneof_case_[0]);
  }
  #endif  // PROTOBUF_INLINE_NOT_IN_HEADERS
  
  // ===================================================================
  
  #if !defined(_MSC_VER) || _MSC_VER >= 1900
  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
  
  NegSqDistSimilarity::NegSqDistSimilarity()
    : ::google::protobuf::Message(), _internal_metadata_(NULL) {
    if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
      protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::InitDefaults();
    }
    SharedCtor();
    // @@protoc_insertion_point(constructor:object_detection.protos.NegSqDistSimilarity)
  }
  NegSqDistSimilarity::NegSqDistSimilarity(const NegSqDistSimilarity& from)
    : ::google::protobuf::Message(),
        _internal_metadata_(NULL),
        _has_bits_(from._has_bits_),
        _cached_size_(0) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    // @@protoc_insertion_point(copy_constructor:object_detection.protos.NegSqDistSimilarity)
  }
  
  void NegSqDistSimilarity::SharedCtor() {
    _cached_size_ = 0;
  }
  
  NegSqDistSimilarity::~NegSqDistSimilarity() {
    // @@protoc_insertion_point(destructor:object_detection.protos.NegSqDistSimilarity)
    SharedDtor();
  }
  
  void NegSqDistSimilarity::SharedDtor() {
  }
  
  void NegSqDistSimilarity::SetCachedSize(int size) const {
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _cached_size_ = size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
  }
  const ::google::protobuf::Descriptor* NegSqDistSimilarity::descriptor() {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::protobuf_AssignDescriptorsOnce();
    return protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  }
  
  const NegSqDistSimilarity& NegSqDistSimilarity::default_instance() {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::InitDefaults();
    return *internal_default_instance();
  }
  
  NegSqDistSimilarity* NegSqDistSimilarity::New(::google::protobuf::Arena* arena) const {
    NegSqDistSimilarity* n = new NegSqDistSimilarity;
    if (arena != NULL) {
      arena->Own(n);
    }
    return n;
  }
  
  void NegSqDistSimilarity::Clear() {
  // @@protoc_insertion_point(message_clear_start:object_detection.protos.NegSqDistSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    _has_bits_.Clear();
    _internal_metadata_.Clear();
  }
  
  bool NegSqDistSimilarity::MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) {
  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
    ::google::protobuf::uint32 tag;
    // @@protoc_insertion_point(parse_start:object_detection.protos.NegSqDistSimilarity)
    for (;;) {
      ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
      tag = p.first;
      if (!p.second) goto handle_unusual;
    handle_unusual:
      if (tag == 0) {
        goto success;
      }
      DO_(::google::protobuf::internal::WireFormat::SkipField(
            input, tag, _internal_metadata_.mutable_unknown_fields()));
    }
  success:
    // @@protoc_insertion_point(parse_success:object_detection.protos.NegSqDistSimilarity)
    return true;
  failure:
    // @@protoc_insertion_point(parse_failure:object_detection.protos.NegSqDistSimilarity)
    return false;
  #undef DO_
  }
  
  void NegSqDistSimilarity::SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const {
    // @@protoc_insertion_point(serialize_start:object_detection.protos.NegSqDistSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (_internal_metadata_.have_unknown_fields()) {
      ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
          _internal_metadata_.unknown_fields(), output);
    }
    // @@protoc_insertion_point(serialize_end:object_detection.protos.NegSqDistSimilarity)
  }
  
  ::google::protobuf::uint8* NegSqDistSimilarity::InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const {
    (void)deterministic; // Unused
    // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.NegSqDistSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (_internal_metadata_.have_unknown_fields()) {
      target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target);
    }
    // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.NegSqDistSimilarity)
    return target;
  }
  
  size_t NegSqDistSimilarity::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:object_detection.protos.NegSqDistSimilarity)
    size_t total_size = 0;
  
    if (_internal_metadata_.have_unknown_fields()) {
      total_size +=
        ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
          _internal_metadata_.unknown_fields());
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _cached_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    return total_size;
  }
  
  void NegSqDistSimilarity::MergeFrom(const ::google::protobuf::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:object_detection.protos.NegSqDistSimilarity)
    GOOGLE_DCHECK_NE(&from, this);
    const NegSqDistSimilarity* source =
        ::google::protobuf::internal::DynamicCastToGenerated<const NegSqDistSimilarity>(
            &from);
    if (source == NULL) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:object_detection.protos.NegSqDistSimilarity)
      ::google::protobuf::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:object_detection.protos.NegSqDistSimilarity)
      MergeFrom(*source);
    }
  }
  
  void NegSqDistSimilarity::MergeFrom(const NegSqDistSimilarity& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.NegSqDistSimilarity)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
  }
  
  void NegSqDistSimilarity::CopyFrom(const ::google::protobuf::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:object_detection.protos.NegSqDistSimilarity)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void NegSqDistSimilarity::CopyFrom(const NegSqDistSimilarity& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.NegSqDistSimilarity)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool NegSqDistSimilarity::IsInitialized() const {
    return true;
  }
  
  void NegSqDistSimilarity::Swap(NegSqDistSimilarity* other) {
    if (other == this) return;
    InternalSwap(other);
  }
  void NegSqDistSimilarity::InternalSwap(NegSqDistSimilarity* other) {
    using std::swap;
    swap(_has_bits_[0], other->_has_bits_[0]);
    _internal_metadata_.Swap(&other->_internal_metadata_);
    swap(_cached_size_, other->_cached_size_);
  }
  
  ::google::protobuf::Metadata NegSqDistSimilarity::GetMetadata() const {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::protobuf_AssignDescriptorsOnce();
    return protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::file_level_metadata[kIndexInFileMessages];
  }
  
  #if PROTOBUF_INLINE_NOT_IN_HEADERS
  // NegSqDistSimilarity
  
  #endif  // PROTOBUF_INLINE_NOT_IN_HEADERS
  
  // ===================================================================
  
  #if !defined(_MSC_VER) || _MSC_VER >= 1900
  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
  
  IouSimilarity::IouSimilarity()
    : ::google::protobuf::Message(), _internal_metadata_(NULL) {
    if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
      protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::InitDefaults();
    }
    SharedCtor();
    // @@protoc_insertion_point(constructor:object_detection.protos.IouSimilarity)
  }
  IouSimilarity::IouSimilarity(const IouSimilarity& from)
    : ::google::protobuf::Message(),
        _internal_metadata_(NULL),
        _has_bits_(from._has_bits_),
        _cached_size_(0) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    // @@protoc_insertion_point(copy_constructor:object_detection.protos.IouSimilarity)
  }
  
  void IouSimilarity::SharedCtor() {
    _cached_size_ = 0;
  }
  
  IouSimilarity::~IouSimilarity() {
    // @@protoc_insertion_point(destructor:object_detection.protos.IouSimilarity)
    SharedDtor();
  }
  
  void IouSimilarity::SharedDtor() {
  }
  
  void IouSimilarity::SetCachedSize(int size) const {
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _cached_size_ = size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
  }
  const ::google::protobuf::Descriptor* IouSimilarity::descriptor() {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::protobuf_AssignDescriptorsOnce();
    return protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  }
  
  const IouSimilarity& IouSimilarity::default_instance() {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::InitDefaults();
    return *internal_default_instance();
  }
  
  IouSimilarity* IouSimilarity::New(::google::protobuf::Arena* arena) const {
    IouSimilarity* n = new IouSimilarity;
    if (arena != NULL) {
      arena->Own(n);
    }
    return n;
  }
  
  void IouSimilarity::Clear() {
  // @@protoc_insertion_point(message_clear_start:object_detection.protos.IouSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    _has_bits_.Clear();
    _internal_metadata_.Clear();
  }
  
  bool IouSimilarity::MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) {
  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
    ::google::protobuf::uint32 tag;
    // @@protoc_insertion_point(parse_start:object_detection.protos.IouSimilarity)
    for (;;) {
      ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
      tag = p.first;
      if (!p.second) goto handle_unusual;
    handle_unusual:
      if (tag == 0) {
        goto success;
      }
      DO_(::google::protobuf::internal::WireFormat::SkipField(
            input, tag, _internal_metadata_.mutable_unknown_fields()));
    }
  success:
    // @@protoc_insertion_point(parse_success:object_detection.protos.IouSimilarity)
    return true;
  failure:
    // @@protoc_insertion_point(parse_failure:object_detection.protos.IouSimilarity)
    return false;
  #undef DO_
  }
  
  void IouSimilarity::SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const {
    // @@protoc_insertion_point(serialize_start:object_detection.protos.IouSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (_internal_metadata_.have_unknown_fields()) {
      ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
          _internal_metadata_.unknown_fields(), output);
    }
    // @@protoc_insertion_point(serialize_end:object_detection.protos.IouSimilarity)
  }
  
  ::google::protobuf::uint8* IouSimilarity::InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const {
    (void)deterministic; // Unused
    // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.IouSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (_internal_metadata_.have_unknown_fields()) {
      target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target);
    }
    // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.IouSimilarity)
    return target;
  }
  
  size_t IouSimilarity::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:object_detection.protos.IouSimilarity)
    size_t total_size = 0;
  
    if (_internal_metadata_.have_unknown_fields()) {
      total_size +=
        ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
          _internal_metadata_.unknown_fields());
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _cached_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    return total_size;
  }
  
  void IouSimilarity::MergeFrom(const ::google::protobuf::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:object_detection.protos.IouSimilarity)
    GOOGLE_DCHECK_NE(&from, this);
    const IouSimilarity* source =
        ::google::protobuf::internal::DynamicCastToGenerated<const IouSimilarity>(
            &from);
    if (source == NULL) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:object_detection.protos.IouSimilarity)
      ::google::protobuf::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:object_detection.protos.IouSimilarity)
      MergeFrom(*source);
    }
  }
  
  void IouSimilarity::MergeFrom(const IouSimilarity& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.IouSimilarity)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
  }
  
  void IouSimilarity::CopyFrom(const ::google::protobuf::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:object_detection.protos.IouSimilarity)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void IouSimilarity::CopyFrom(const IouSimilarity& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.IouSimilarity)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool IouSimilarity::IsInitialized() const {
    return true;
  }
  
  void IouSimilarity::Swap(IouSimilarity* other) {
    if (other == this) return;
    InternalSwap(other);
  }
  void IouSimilarity::InternalSwap(IouSimilarity* other) {
    using std::swap;
    swap(_has_bits_[0], other->_has_bits_[0]);
    _internal_metadata_.Swap(&other->_internal_metadata_);
    swap(_cached_size_, other->_cached_size_);
  }
  
  ::google::protobuf::Metadata IouSimilarity::GetMetadata() const {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::protobuf_AssignDescriptorsOnce();
    return protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::file_level_metadata[kIndexInFileMessages];
  }
  
  #if PROTOBUF_INLINE_NOT_IN_HEADERS
  // IouSimilarity
  
  #endif  // PROTOBUF_INLINE_NOT_IN_HEADERS
  
  // ===================================================================
  
  #if !defined(_MSC_VER) || _MSC_VER >= 1900
  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
  
  IoaSimilarity::IoaSimilarity()
    : ::google::protobuf::Message(), _internal_metadata_(NULL) {
    if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
      protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::InitDefaults();
    }
    SharedCtor();
    // @@protoc_insertion_point(constructor:object_detection.protos.IoaSimilarity)
  }
  IoaSimilarity::IoaSimilarity(const IoaSimilarity& from)
    : ::google::protobuf::Message(),
        _internal_metadata_(NULL),
        _has_bits_(from._has_bits_),
        _cached_size_(0) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    // @@protoc_insertion_point(copy_constructor:object_detection.protos.IoaSimilarity)
  }
  
  void IoaSimilarity::SharedCtor() {
    _cached_size_ = 0;
  }
  
  IoaSimilarity::~IoaSimilarity() {
    // @@protoc_insertion_point(destructor:object_detection.protos.IoaSimilarity)
    SharedDtor();
  }
  
  void IoaSimilarity::SharedDtor() {
  }
  
  void IoaSimilarity::SetCachedSize(int size) const {
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _cached_size_ = size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
  }
  const ::google::protobuf::Descriptor* IoaSimilarity::descriptor() {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::protobuf_AssignDescriptorsOnce();
    return protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  }
  
  const IoaSimilarity& IoaSimilarity::default_instance() {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::InitDefaults();
    return *internal_default_instance();
  }
  
  IoaSimilarity* IoaSimilarity::New(::google::protobuf::Arena* arena) const {
    IoaSimilarity* n = new IoaSimilarity;
    if (arena != NULL) {
      arena->Own(n);
    }
    return n;
  }
  
  void IoaSimilarity::Clear() {
  // @@protoc_insertion_point(message_clear_start:object_detection.protos.IoaSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    _has_bits_.Clear();
    _internal_metadata_.Clear();
  }
  
  bool IoaSimilarity::MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) {
  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
    ::google::protobuf::uint32 tag;
    // @@protoc_insertion_point(parse_start:object_detection.protos.IoaSimilarity)
    for (;;) {
      ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
      tag = p.first;
      if (!p.second) goto handle_unusual;
    handle_unusual:
      if (tag == 0) {
        goto success;
      }
      DO_(::google::protobuf::internal::WireFormat::SkipField(
            input, tag, _internal_metadata_.mutable_unknown_fields()));
    }
  success:
    // @@protoc_insertion_point(parse_success:object_detection.protos.IoaSimilarity)
    return true;
  failure:
    // @@protoc_insertion_point(parse_failure:object_detection.protos.IoaSimilarity)
    return false;
  #undef DO_
  }
  
  void IoaSimilarity::SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const {
    // @@protoc_insertion_point(serialize_start:object_detection.protos.IoaSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (_internal_metadata_.have_unknown_fields()) {
      ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
          _internal_metadata_.unknown_fields(), output);
    }
    // @@protoc_insertion_point(serialize_end:object_detection.protos.IoaSimilarity)
  }
  
  ::google::protobuf::uint8* IoaSimilarity::InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const {
    (void)deterministic; // Unused
    // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.IoaSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (_internal_metadata_.have_unknown_fields()) {
      target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target);
    }
    // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.IoaSimilarity)
    return target;
  }
  
  size_t IoaSimilarity::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:object_detection.protos.IoaSimilarity)
    size_t total_size = 0;
  
    if (_internal_metadata_.have_unknown_fields()) {
      total_size +=
        ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
          _internal_metadata_.unknown_fields());
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _cached_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    return total_size;
  }
  
  void IoaSimilarity::MergeFrom(const ::google::protobuf::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:object_detection.protos.IoaSimilarity)
    GOOGLE_DCHECK_NE(&from, this);
    const IoaSimilarity* source =
        ::google::protobuf::internal::DynamicCastToGenerated<const IoaSimilarity>(
            &from);
    if (source == NULL) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:object_detection.protos.IoaSimilarity)
      ::google::protobuf::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:object_detection.protos.IoaSimilarity)
      MergeFrom(*source);
    }
  }
  
  void IoaSimilarity::MergeFrom(const IoaSimilarity& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.IoaSimilarity)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
  }
  
  void IoaSimilarity::CopyFrom(const ::google::protobuf::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:object_detection.protos.IoaSimilarity)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void IoaSimilarity::CopyFrom(const IoaSimilarity& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.IoaSimilarity)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool IoaSimilarity::IsInitialized() const {
    return true;
  }
  
  void IoaSimilarity::Swap(IoaSimilarity* other) {
    if (other == this) return;
    InternalSwap(other);
  }
  void IoaSimilarity::InternalSwap(IoaSimilarity* other) {
    using std::swap;
    swap(_has_bits_[0], other->_has_bits_[0]);
    _internal_metadata_.Swap(&other->_internal_metadata_);
    swap(_cached_size_, other->_cached_size_);
  }
  
  ::google::protobuf::Metadata IoaSimilarity::GetMetadata() const {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::protobuf_AssignDescriptorsOnce();
    return protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::file_level_metadata[kIndexInFileMessages];
  }
  
  #if PROTOBUF_INLINE_NOT_IN_HEADERS
  // IoaSimilarity
  
  #endif  // PROTOBUF_INLINE_NOT_IN_HEADERS
  
  // ===================================================================
  
  #if !defined(_MSC_VER) || _MSC_VER >= 1900
  const int ThresholdedIouSimilarity::kIouThresholdFieldNumber;
  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
  
  ThresholdedIouSimilarity::ThresholdedIouSimilarity()
    : ::google::protobuf::Message(), _internal_metadata_(NULL) {
    if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
      protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::InitDefaults();
    }
    SharedCtor();
    // @@protoc_insertion_point(constructor:object_detection.protos.ThresholdedIouSimilarity)
  }
  ThresholdedIouSimilarity::ThresholdedIouSimilarity(const ThresholdedIouSimilarity& from)
    : ::google::protobuf::Message(),
        _internal_metadata_(NULL),
        _has_bits_(from._has_bits_),
        _cached_size_(0) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    iou_threshold_ = from.iou_threshold_;
    // @@protoc_insertion_point(copy_constructor:object_detection.protos.ThresholdedIouSimilarity)
  }
  
  void ThresholdedIouSimilarity::SharedCtor() {
    _cached_size_ = 0;
    iou_threshold_ = 0.5f;
  }
  
  ThresholdedIouSimilarity::~ThresholdedIouSimilarity() {
    // @@protoc_insertion_point(destructor:object_detection.protos.ThresholdedIouSimilarity)
    SharedDtor();
  }
  
  void ThresholdedIouSimilarity::SharedDtor() {
  }
  
  void ThresholdedIouSimilarity::SetCachedSize(int size) const {
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _cached_size_ = size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
  }
  const ::google::protobuf::Descriptor* ThresholdedIouSimilarity::descriptor() {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::protobuf_AssignDescriptorsOnce();
    return protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  }
  
  const ThresholdedIouSimilarity& ThresholdedIouSimilarity::default_instance() {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::InitDefaults();
    return *internal_default_instance();
  }
  
  ThresholdedIouSimilarity* ThresholdedIouSimilarity::New(::google::protobuf::Arena* arena) const {
    ThresholdedIouSimilarity* n = new ThresholdedIouSimilarity;
    if (arena != NULL) {
      arena->Own(n);
    }
    return n;
  }
  
  void ThresholdedIouSimilarity::Clear() {
  // @@protoc_insertion_point(message_clear_start:object_detection.protos.ThresholdedIouSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    iou_threshold_ = 0.5f;
    _has_bits_.Clear();
    _internal_metadata_.Clear();
  }
  
  bool ThresholdedIouSimilarity::MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input) {
  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
    ::google::protobuf::uint32 tag;
    // @@protoc_insertion_point(parse_start:object_detection.protos.ThresholdedIouSimilarity)
    for (;;) {
      ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
      tag = p.first;
      if (!p.second) goto handle_unusual;
      switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
        // optional float iou_threshold = 1 [default = 0.5];
        case 1: {
          if (static_cast< ::google::protobuf::uint8>(tag) ==
              static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
            set_has_iou_threshold();
            DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                     float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                   input, &iou_threshold_)));
          } else {
            goto handle_unusual;
          }
          break;
        }
  
        default: {
        handle_unusual:
          if (tag == 0) {
            goto success;
          }
          DO_(::google::protobuf::internal::WireFormat::SkipField(
                input, tag, _internal_metadata_.mutable_unknown_fields()));
          break;
        }
      }
    }
  success:
    // @@protoc_insertion_point(parse_success:object_detection.protos.ThresholdedIouSimilarity)
    return true;
  failure:
    // @@protoc_insertion_point(parse_failure:object_detection.protos.ThresholdedIouSimilarity)
    return false;
  #undef DO_
  }
  
  void ThresholdedIouSimilarity::SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const {
    // @@protoc_insertion_point(serialize_start:object_detection.protos.ThresholdedIouSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    cached_has_bits = _has_bits_[0];
    // optional float iou_threshold = 1 [default = 0.5];
    if (cached_has_bits & 0x00000001u) {
      ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->iou_threshold(), output);
    }
  
    if (_internal_metadata_.have_unknown_fields()) {
      ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
          _internal_metadata_.unknown_fields(), output);
    }
    // @@protoc_insertion_point(serialize_end:object_detection.protos.ThresholdedIouSimilarity)
  }
  
  ::google::protobuf::uint8* ThresholdedIouSimilarity::InternalSerializeWithCachedSizesToArray(
      bool deterministic, ::google::protobuf::uint8* target) const {
    (void)deterministic; // Unused
    // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.ThresholdedIouSimilarity)
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    cached_has_bits = _has_bits_[0];
    // optional float iou_threshold = 1 [default = 0.5];
    if (cached_has_bits & 0x00000001u) {
      target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->iou_threshold(), target);
    }
  
    if (_internal_metadata_.have_unknown_fields()) {
      target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target);
    }
    // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.ThresholdedIouSimilarity)
    return target;
  }
  
  size_t ThresholdedIouSimilarity::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:object_detection.protos.ThresholdedIouSimilarity)
    size_t total_size = 0;
  
    if (_internal_metadata_.have_unknown_fields()) {
      total_size +=
        ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
          _internal_metadata_.unknown_fields());
    }
    // optional float iou_threshold = 1 [default = 0.5];
    if (has_iou_threshold()) {
      total_size += 1 + 4;
    }
  
    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _cached_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    return total_size;
  }
  
  void ThresholdedIouSimilarity::MergeFrom(const ::google::protobuf::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:object_detection.protos.ThresholdedIouSimilarity)
    GOOGLE_DCHECK_NE(&from, this);
    const ThresholdedIouSimilarity* source =
        ::google::protobuf::internal::DynamicCastToGenerated<const ThresholdedIouSimilarity>(
            &from);
    if (source == NULL) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:object_detection.protos.ThresholdedIouSimilarity)
      ::google::protobuf::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:object_detection.protos.ThresholdedIouSimilarity)
      MergeFrom(*source);
    }
  }
  
  void ThresholdedIouSimilarity::MergeFrom(const ThresholdedIouSimilarity& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.ThresholdedIouSimilarity)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::google::protobuf::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (from.has_iou_threshold()) {
      set_iou_threshold(from.iou_threshold());
    }
  }
  
  void ThresholdedIouSimilarity::CopyFrom(const ::google::protobuf::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:object_detection.protos.ThresholdedIouSimilarity)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void ThresholdedIouSimilarity::CopyFrom(const ThresholdedIouSimilarity& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.ThresholdedIouSimilarity)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool ThresholdedIouSimilarity::IsInitialized() const {
    return true;
  }
  
  void ThresholdedIouSimilarity::Swap(ThresholdedIouSimilarity* other) {
    if (other == this) return;
    InternalSwap(other);
  }
  void ThresholdedIouSimilarity::InternalSwap(ThresholdedIouSimilarity* other) {
    using std::swap;
    swap(iou_threshold_, other->iou_threshold_);
    swap(_has_bits_[0], other->_has_bits_[0]);
    _internal_metadata_.Swap(&other->_internal_metadata_);
    swap(_cached_size_, other->_cached_size_);
  }
  
  ::google::protobuf::Metadata ThresholdedIouSimilarity::GetMetadata() const {
    protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::protobuf_AssignDescriptorsOnce();
    return protobuf_object_5fdetection_2fprotos_2fregion_5fsimilarity_5fcalculator_2eproto::file_level_metadata[kIndexInFileMessages];
  }
  
  #if PROTOBUF_INLINE_NOT_IN_HEADERS
  // ThresholdedIouSimilarity
  
  // optional float iou_threshold = 1 [default = 0.5];
  bool ThresholdedIouSimilarity::has_iou_threshold() const {
    return (_has_bits_[0] & 0x00000001u) != 0;
  }
  void ThresholdedIouSimilarity::set_has_iou_threshold() {
    _has_bits_[0] |= 0x00000001u;
  }
  void ThresholdedIouSimilarity::clear_has_iou_threshold() {
    _has_bits_[0] &= ~0x00000001u;
  }
  void ThresholdedIouSimilarity::clear_iou_threshold() {
    iou_threshold_ = 0.5f;
    clear_has_iou_threshold();
  }
  float ThresholdedIouSimilarity::iou_threshold() const {
    // @@protoc_insertion_point(field_get:object_detection.protos.ThresholdedIouSimilarity.iou_threshold)
    return iou_threshold_;
  }
  void ThresholdedIouSimilarity::set_iou_threshold(float value) {
    set_has_iou_threshold();
    iou_threshold_ = value;
    // @@protoc_insertion_point(field_set:object_detection.protos.ThresholdedIouSimilarity.iou_threshold)
  }
  
  #endif  // PROTOBUF_INLINE_NOT_IN_HEADERS
  
  // @@protoc_insertion_point(namespace_scope)
  
  }  // namespace protos
  }  // namespace object_detection
  
  // @@protoc_insertion_point(global_scope)
  