123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368 |
- using AIPlatform.Protocol.LabelItems;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- namespace AIPlatform.Protocol.Entities
- {
- /// <summary>
- /// 分类层级
- /// </summary>
- public enum CategoryLevel
- {
- [Display(Name = "无")]
- None = -1,
- /// <summary>
- /// 组织
- /// </summary>
- [Display(Name = "组织")]
- Organization = 0,
- /// <summary>
- /// 图像大类,同步于标签模板
- /// </summary>
- [Display(Name = "大类")]
- MainCategory = 1,
- /// <summary>
- /// 图像批次
- /// </summary>
- [Display(Name = "批次")]
- Batch,
- /// <summary>
- /// 重复分配用例
- /// </summary>
- [Display(Name = "用例")]
- SameBatchLabelCase,
- }
- /// <summary>
- /// 人员类型
- /// </summary>
- public enum AccountType
- {
- None,
- /// <summary>
- /// 管理者
- /// </summary>
- Admin,
- /// <summary>
- /// 开发者
- /// </summary>
- Developer,
- /// <summary>
- /// 标注者
- /// </summary>
- Labeler,
- /// <summary>
- /// 审核者
- /// </summary>
- Reviewer,
- /// <summary>
- /// 共享者
- /// </summary>
- Sharer,
- /// <summary>
- /// 采集者
- /// </summary>
- Gatherer,
- }
- /// <summary>
- /// 图像类别
- /// </summary>
- public class ImageCategory : Entity
- {
- /// <summary>
- /// Gets or sets the name
- /// </summary>
- public string Name { get; set; }
- /// <summary>
- /// Gets or sets the level
- /// </summary>
- public CategoryLevel Level { get; set; }
- /// <summary>
- /// Gets or sets the parent hierarchy
- /// </summary>
- public EntityBase Parent { get; set; }
- /// <summary>
- /// Gets or sets the organization id
- /// </summary>
- public long OrganizationId { get; set; }
- /// <summary>
- /// Gets or sets the label package content id
- /// </summary>
- public long LabelPackageContentId { get; set; }
- /// <summary>
- /// Gets or sets the same batch label case id
- /// </summary>
- public long SameBatchLabelCaseId { get; set; }
- /// <summary>
- /// Gets or sets the labelers
- /// </summary>
- public List<EntityBase> Labelers { get; set; }
- /// <summary>
- /// Gets or sets the developers
- /// </summary>
- public List<EntityBase> Developers { get; set; }
- /// <summary>
- /// Gets or sets the sharers
- /// </summary>
- public List<EntityBase> Sharers { get; set; }
- /// <summary>
- /// Gets or sets the gatherers
- /// </summary>
- public List<EntityBase> Gatherers { get; set; }
- /// <summary>
- /// Gets or sets the image quantity item
- /// </summary>
- [Obsolete]
- public ImageQuantityItem ImageQuantityItem { get; set; }
- /// <summary>
- /// Gets or sets the gold standard file quantity item
- /// </summary>
- [Obsolete]
- public GoldStandardQuantityItem GoldStandardQuantityItem { get; set; }
- /// <summary>
- /// Gets or sets the self-check file quantity item
- /// </summary>
- [Obsolete]
- public SelfCheckQuantityItem SelfCheckQuantityItem { get; set; }
- /// <summary>
- /// Gets or sets the questioned labeled ultrasound files' quantity item
- /// </summary>
- [Obsolete]
- public ImageQuantityBase QuestionedQuantityItem { get; set; }
- /// <summary>
- /// Gets or sets the questioned labeled ultrasound files' quantity details
- /// </summary>
- [Obsolete]
- public List<QuestionedQuantityItem> QuestionedQuantityDetails { get; set; }
- /// <summary>
- /// Gets or sets whether category has children
- /// </summary>
- public bool HasChildren { get; set; }
- /// <summary>
- /// Gets or sets the value to indicate whether the labler is created due to the old labeled image data imported.
- /// If true, then the labler is only used for old images, can't use in any other situation.
- /// </summary>
- public bool IsImportedFormOldData { get; set; }
- /// <summary>
- /// Gets or sets the value to indicate whether the image does it support skip frame.
- /// </summary>
- public bool IsSupportedSkipFrame { get; set; }
- /// <summary>
- /// Gets or sets the video item
- /// </summary>
- public VideoItem VideoItem { get; set; }
- /// <summary>
- /// Gets or sets the group quantity item
- /// </summary>
- public QuantityItem GroupItem { get; set; }
- /// <summary>
- /// Gets or sets the file quantity item
- /// </summary>
- public QuantityItem FileItem { get; set; }
- /// <summary>
- /// Gets or sets the madal quantity items
- /// </summary>
- public List<ModalQuantityItem> ModalItems { get; set; }
- /// <summary>
- /// Gets or sets the Difficulty Level
- /// </summary>
- public DifficultyLevel DifficultyLevel { get; set; }
- /// <summary>
- /// Gets or sets the develop confirm info
- /// </summary>
- public DevelopConfirmInfo DevelopConfirmInfo { get; set; }
- public ImageCategory()
- {
- Labelers = new List<EntityBase>();
- Developers = new List<EntityBase>();
- Sharers = new List<EntityBase>();
- Gatherers = new List<EntityBase>();
- VideoItem = new VideoItem();
- GroupItem = new QuantityItem();
- FileItem = new QuantityItem();
- ModalItems = new List<ModalQuantityItem>();
- DevelopConfirmInfo = new DevelopConfirmInfo();
- }
- //overrid Name to Dispaly
- public override string ToString()
- {
- return Name;
- }
- }
- public class QuantityItem
- {
- /// <summary>
- /// Gets or sets the file quantity
- /// </summary>
- public ImageQuantityItem Quantity { get; set; }
- /// <summary>
- /// Gets or sets the gold standard file quantity
- /// </summary>
- public GoldStandardQuantityItem GoldStandardQuantity { get; set; }
- /// <summary>
- /// Gets or sets the self-check file quantity
- /// </summary>
- public SelfCheckQuantityItem SelfCheckQuantity { get; set; }
- /// <summary>
- /// Gets or sets the questioned labeled ultrasound files' quantity
- /// </summary>
- public ImageQuantityBase QuestionedQuantity { get; set; }
- /// <summary>
- /// Gets or sets the questioned labeled ultrasound files' quantity details
- /// </summary>
- public List<QuestionedQuantityItem> QuestionedQuantityDetails { get; set; }
- public QuantityItem()
- {
- Quantity = new ImageQuantityItem();
- QuestionedQuantity = new ImageQuantityBase();
- QuestionedQuantityDetails = new List<QuestionedQuantityItem>();
- }
- }
- public class ModalQuantityItem : QuantityItem
- {
- /// <summary>
- /// Gets or sets the label modal.
- /// </summary>s
- public LabelItemBase Modal { get; set; }
- }
- public class ImageQuantityBase
- {
- /// <summary>
- /// Gets or sets the files total
- /// </summary>
- [Display(Name = "总数")]
- public int Total { get; set; }
- /// <summary>
- /// Gets or sets the labeled files count
- /// </summary>
- [Display(Name = "已标注图像")]
- public int Labeled { get; set; }
- /// <summary>
- /// Gets or sets the files have seen count
- /// </summary>
- [Display(Name = "已看过图像")]
- public int Seen { get; set; }
- /// <summary>
- /// Gets or sets the files skipped count
- /// </summary>
- [Display(Name = "已跳过图像")]
- public int Skipped { get; set; }
- /// <summary>
- /// Gets or sets the unLabeled files count
- /// </summary>
- [Display(Name = "未标注图像")]
- public int UnLabeled { get; set; }
- /// <summary>
- /// Gets or sets the unAssigned files count
- /// </summary>
- [Display(Name = "未分配图像")]
- public int UnAssigned { get; set; }
- }
- /// <summary>
- /// 图像数量项
- /// </summary>
- public class ImageQuantityItem : ImageQuantityBase
- {
- /// <summary>
- /// Gets or sets the unAdoptable files count
- /// </summary>
- [Display(Name = "不合格图像")]
- public int UnAdoptable { get; set; }
- }
- /// <summary>
- /// 金标准数量项
- /// </summary>
- public class GoldStandardQuantityItem
- {
- /// <summary>
- /// Gets or sets the number of people up to standard
- /// </summary>
- [Display(Name = "达标人数")]
- public int QualifiedPeople { get; set; }
- /// <summary>
- /// Gets or sets the proportion of the gold standard files
- /// </summary>
- [Display(Name = "占总数中的比例")]
- public double Proportion { get; set; }
- /// <summary>
- /// Gets or sets the existing quantity of gold standard files
- /// </summary>
- [Display(Name = "已有数量")]
- public int Existing { get; set; }
- /// <summary>
- /// Gets or sets the gold standard files to be added quantity
- /// </summary>
- [Display(Name = "还需添加数量")]
- public int ToBeAdded { get; set; }
- }
- /// <summary>
- /// 自校验数量项
- /// </summary>
- public class SelfCheckQuantityItem
- {
- /// <summary>
- /// Gets or sets the proportion of the self-check files
- /// </summary>
- [Display(Name = "占总数中的比例")]
- public double Proportion { get; set; }
- }
- /// <summary>
- /// 质疑数量详情
- /// </summary>
- public class QuestionedQuantityItem : ImageQuantityBase
- {
- /// <summary>
- /// Gets or sets the labeler
- /// </summary>
- public EntityBase Labeler { get; set; }
- }
- public class VideoItem
- {
- [Display(Name = "视频标注帧模式")]
- public FrameMode FrameMode { get; set; }
- [Display(Name = "间隔帧数")]
- public int IntervalFrame { get; set; }
- [Display(Name = "相似度阈值")]
- public double SimilarityThreshold { get; set; }
- public VideoItem()
- {
- IntervalFrame = 1;
- }
- }
- }
|