Esempio n. 1
0
        public void MergeFrom(RegionSimilarityCalculator other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.RegionSimilarityCase)
            {
            case RegionSimilarityOneofCase.NegSqDistSimilarity:
                if (NegSqDistSimilarity == null)
                {
                    NegSqDistSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity();
                }
                NegSqDistSimilarity.MergeFrom(other.NegSqDistSimilarity);
                break;

            case RegionSimilarityOneofCase.IouSimilarity:
                if (IouSimilarity == null)
                {
                    IouSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity();
                }
                IouSimilarity.MergeFrom(other.IouSimilarity);
                break;

            case RegionSimilarityOneofCase.IoaSimilarity:
                if (IoaSimilarity == null)
                {
                    IoaSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity();
                }
                IoaSimilarity.MergeFrom(other.IoaSimilarity);
                break;

            case RegionSimilarityOneofCase.ThresholdedIouSimilarity:
                if (ThresholdedIouSimilarity == null)
                {
                    ThresholdedIouSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity();
                }
                ThresholdedIouSimilarity.MergeFrom(other.ThresholdedIouSimilarity);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Esempio n. 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity();
                    if (regionSimilarityCase_ == RegionSimilarityOneofCase.NegSqDistSimilarity)
                    {
                        subBuilder.MergeFrom(NegSqDistSimilarity);
                    }
                    input.ReadMessage(subBuilder);
                    NegSqDistSimilarity = subBuilder;
                    break;
                }

                case 18: {
                    global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity();
                    if (regionSimilarityCase_ == RegionSimilarityOneofCase.IouSimilarity)
                    {
                        subBuilder.MergeFrom(IouSimilarity);
                    }
                    input.ReadMessage(subBuilder);
                    IouSimilarity = subBuilder;
                    break;
                }

                case 26: {
                    global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity();
                    if (regionSimilarityCase_ == RegionSimilarityOneofCase.IoaSimilarity)
                    {
                        subBuilder.MergeFrom(IoaSimilarity);
                    }
                    input.ReadMessage(subBuilder);
                    IoaSimilarity = subBuilder;
                    break;
                }

                case 34: {
                    global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity();
                    if (regionSimilarityCase_ == RegionSimilarityOneofCase.ThresholdedIouSimilarity)
                    {
                        subBuilder.MergeFrom(ThresholdedIouSimilarity);
                    }
                    input.ReadMessage(subBuilder);
                    ThresholdedIouSimilarity = subBuilder;
                    break;
                }
                }
            }
        }