Exemple #1
0
        public void UpdateAnnotationStatus(AnnotationImage annotationImage)
        {
            if (!this.Images.Contains(annotationImage))
            {
                this.Images.Add(annotationImage);
            }

            var annotationPercentage = this.Images.Count(o => o.BoundingBoxes != null) / (double)this.Images.Count * 100.0;

            this.AnnotationPercentage = annotationPercentage;
            this.IsAnnotated          = annotationPercentage >= 100;
        }
        public void UpdateAnnotationStatus(AnnotationImage annotationImage)
        {
            var image1 = this.Info.Images.Where(o => o.ImageName.Equals(annotationImage.DisplayName)).FirstOrDefault();

            if (image1 == null)
            {
                image1 = new AnnotationImageDto {
                    ImageName = annotationImage.DisplayName, BoundingBoxes = annotationImage.BoundingBoxes
                };
                this.Info.Images.Add(image1);
            }
            else
            {
                image1.BoundingBoxes = annotationImage.BoundingBoxes;
            }

            var images = this.GetImages();

            var annotationPercentage = this.Info.Images.Count / (double)images.Length * 100.0;

            this.Info.AnnotationPercentage = annotationPercentage;
            this.Info.IsAnnotated          = annotationPercentage >= 100;
        }
Exemple #3
0
 public AnnotationImage(AnnotationImage image)
 {
     this.FilePath      = image.FilePath;
     this.DisplayName   = image.DisplayName;
     this.BoundingBoxes = image.BoundingBoxes;
 }