Documentation ¶
Index ¶
- type AnnotatioExportImageClassification
- type BatchAnnotatioExportImageClassification
- func (b BatchAnnotatioExportImageClassification) At(idx int) AnnotatioExportImageClassification
- func (b BatchAnnotatioExportImageClassification) ForEach(do EachFunc) error
- func (b BatchAnnotatioExportImageClassification) Len() int
- func (b *BatchAnnotatioExportImageClassification) Unmarshal(blob []byte) error
- type CreateProjectRequestBody
- type EachFunc
- type LabelConfig
- type ProjectImportData
- type ProjectImportDataData
- type ProjectResource
- type ProjectService
- func (p *ProjectService) CreateProject(ctx context.Context, title, description string, labelConfig LabelConfig) (*lsopenapi.Project, error)
- func (p *ProjectService) CreateProjectExport(ctx context.Context, pid int32) (*lsopenapi.ExportCreate, error)
- func (p *ProjectService) CreateProjectImport(ctx context.Context, pid int32, data ProjectImportData) (*lsopenapi.TaskCreationResponse, error)
- func (p *ProjectService) DownloadExport(ctx context.Context, pid int32, exportId int32, dst io.Writer) error
- func (p *ProjectService) GetProject(ctx context.Context, pid int32) (*lsopenapi.Project, error)
- func (p *ProjectService) GetProjectExport(ctx context.Context, pid int32, exportId int32) (*lsopenapi.Export, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnotatioExportImageClassification ¶
type AnnotatioExportImageClassification struct { ID int `json:"id,omitempty"` Annotations []struct { ID int `json:"id,omitempty"` CompletedBy int `json:"completed_by,omitempty"` Result []struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Value struct { Choices []string `json:"choices,omitempty"` } `json:"value,omitempty"` Origin string `json:"origin,omitempty"` ToName string `json:"to_name,omitempty"` FromName string `json:"from_name,omitempty"` } `json:"result,omitempty"` WasCancelled bool `json:"was_cancelled,omitempty"` GroundTruth bool `json:"ground_truth,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` DraftCreatedAt any `json:"draft_created_at,omitempty"` LeadTime float64 `json:"lead_time,omitempty"` Prediction struct { } `json:"prediction,omitempty"` ResultCount int `json:"result_count,omitempty"` UniqueID string `json:"unique_id,omitempty"` ImportID any `json:"import_id,omitempty"` LastAction any `json:"last_action,omitempty"` Task int `json:"task,omitempty"` Project int `json:"project,omitempty"` UpdatedBy int `json:"updated_by,omitempty"` ParentPrediction any `json:"parent_prediction,omitempty"` ParentAnnotation any `json:"parent_annotation,omitempty"` LastCreatedBy any `json:"last_created_by,omitempty"` } `json:"annotations,omitempty"` Drafts []any `json:"drafts,omitempty"` Predictions []any `json:"predictions,omitempty"` Data struct { Image string `json:"image,omitempty"` } `json:"data,omitempty"` Meta struct { } `json:"meta,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` InnerID int `json:"inner_id,omitempty"` TotalAnnotations int `json:"total_annotations,omitempty"` CancelledAnnotations int `json:"cancelled_annotations,omitempty"` TotalPredictions int `json:"total_predictions,omitempty"` CommentCount int `json:"comment_count,omitempty"` UnresolvedCommentCount int `json:"unresolved_comment_count,omitempty"` LastCommentUpdatedAt any `json:"last_comment_updated_at,omitempty"` Project int `json:"project,omitempty"` UpdatedBy int `json:"updated_by,omitempty"` CommentAuthors []any `json:"comment_authors,omitempty"` }
type BatchAnnotatioExportImageClassification ¶
type BatchAnnotatioExportImageClassification []AnnotatioExportImageClassification
func (BatchAnnotatioExportImageClassification) At ¶
func (b BatchAnnotatioExportImageClassification) At(idx int) AnnotatioExportImageClassification
func (BatchAnnotatioExportImageClassification) ForEach ¶
func (b BatchAnnotatioExportImageClassification) ForEach(do EachFunc) error
func (BatchAnnotatioExportImageClassification) Len ¶
func (b BatchAnnotatioExportImageClassification) Len() int
func (*BatchAnnotatioExportImageClassification) Unmarshal ¶
func (b *BatchAnnotatioExportImageClassification) Unmarshal(blob []byte) error
type CreateProjectRequestBody ¶
type CreateProjectRequestBody struct { Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` LabelConfig string `json:"label_config,omitempty"` }
func (*CreateProjectRequestBody) ToJSONReader ¶
func (c *CreateProjectRequestBody) ToJSONReader() io.Reader
type EachFunc ¶
type EachFunc func(a AnnotatioExportImageClassification) error
type LabelConfig ¶
type LabelConfig string
var ( LabelConfigDefaultKeyPointLabels LabelConfig = `` /* 210-byte string literal not displayed */ LabelConfigDefaultImageClassification LabelConfig = `` /* 209-byte string literal not displayed */ LabelConfigDefaultSoundEventDetection LabelConfig = `` /* 232-byte string literal not displayed */ )
func (LabelConfig) String ¶
func (l LabelConfig) String() string
type ProjectImportData ¶
type ProjectImportData ProjectImportDataData
type ProjectImportDataData ¶
type ProjectResource ¶
type ProjectResource struct { ID int `json:"id,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` LabelConfig string `json:"label_config,omitempty"` ExpertInstruction string `json:"expert_instruction,omitempty"` ShowInstruction bool `json:"show_instruction,omitempty"` ShowSkipButton bool `json:"show_skip_button,omitempty"` EnableEmptyAnnotation bool `json:"enable_empty_annotation,omitempty"` ShowAnnotationHistory bool `json:"show_annotation_history,omitempty"` Organization int `json:"organization,omitempty"` Color string `json:"color,omitempty"` MaximumAnnotations int `json:"maximum_annotations,omitempty"` IsPublished bool `json:"is_published,omitempty"` ModelVersion string `json:"model_version,omitempty"` IsDraft bool `json:"is_draft,omitempty"` CreatedBy struct { ID int `json:"id,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` Email string `json:"email,omitempty"` Avatar any `json:"avatar,omitempty"` } `json:"created_by,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` MinAnnotationsToStartTraining int `json:"min_annotations_to_start_training,omitempty"` StartTrainingOnAnnotationUpdate bool `json:"start_training_on_annotation_update,omitempty"` ShowCollabPredictions bool `json:"show_collab_predictions,omitempty"` NumTasksWithAnnotations int `json:"num_tasks_with_annotations,omitempty"` TaskNumber int `json:"task_number,omitempty"` UsefulAnnotationNumber int `json:"useful_annotation_number,omitempty"` GroundTruthNumber int `json:"ground_truth_number,omitempty"` SkippedAnnotationsNumber int `json:"skipped_annotations_number,omitempty"` TotalAnnotationsNumber int `json:"total_annotations_number,omitempty"` TotalPredictionsNumber int `json:"total_predictions_number,omitempty"` Sampling string `json:"sampling,omitempty"` ShowGroundTruthFirst bool `json:"show_ground_truth_first,omitempty"` ShowOverlapFirst bool `json:"show_overlap_first,omitempty"` OverlapCohortPercentage int `json:"overlap_cohort_percentage,omitempty"` TaskDataLogin any `json:"task_data_login,omitempty"` TaskDataPassword any `json:"task_data_password,omitempty"` ControlWeights struct { Kp1 struct { Overall float64 `json:"overall,omitempty"` Type string `json:"type,omitempty"` Labels struct { Face float64 `json:"Face,omitempty"` Nose float64 `json:"Nose,omitempty"` } `json:"labels,omitempty"` } `json:"kp-1,omitempty"` Choice struct { Type string `json:"type,omitempty"` Labels struct { Weapons float64 `json:"Weapons,omitempty"` Violence float64 `json:"Violence,omitempty"` AdultContent float64 `json:"Adult content,omitempty"` } `json:"labels,omitempty"` Overall float64 `json:"overall,omitempty"` } `json:"choice,omitempty"` Label struct { Type string `json:"type,omitempty"` Labels struct { EventA float64 `json:"Event A,omitempty"` EventB float64 `json:"Event B,omitempty"` } `json:"labels,omitempty"` Overall float64 `json:"overall,omitempty"` } `json:"label,omitempty"` } `json:"control_weights,omitempty"` ParsedLabelConfig struct { // Kp1 is for key point segmentation Kp1 struct { Type string `json:"type,omitempty"` ToName []string `json:"to_name,omitempty"` Inputs []struct { Type string `json:"type,omitempty"` Value string `json:"value,omitempty"` } `json:"inputs,omitempty"` Labels []string `json:"labels,omitempty"` LabelsAttrs struct { Face struct { Value string `json:"value,omitempty"` Background string `json:"background,omitempty"` } `json:"Face,omitempty"` Nose struct { Value string `json:"value,omitempty"` Background string `json:"background,omitempty"` } `json:"Nose,omitempty"` } `json:"labels_attrs,omitempty"` } `json:"kp-1,omitempty"` // Choice is for image classification Choice struct { Type string `json:"type,omitempty"` Inputs []struct { Type string `json:"type,omitempty"` Value string `json:"value,omitempty"` } `json:"inputs,omitempty"` Labels []string `json:"labels,omitempty"` ToName []string `json:"to_name,omitempty"` LabelsAttrs struct { Weapons struct { Value string `json:"value,omitempty"` } `json:"Weapons,omitempty"` Violence struct { Value string `json:"value,omitempty"` } `json:"Violence,omitempty"` AdultContent struct { Value string `json:"value,omitempty"` } `json:"Adult content,omitempty"` } `json:"labels_attrs,omitempty"` } `json:"choice,omitempty"` // Label is for audio labeling Label struct { Type string `json:"type,omitempty"` Inputs []struct { Type string `json:"type,omitempty"` Value string `json:"value,omitempty"` } `json:"inputs,omitempty"` Labels []string `json:"labels,omitempty"` ToName []string `json:"to_name,omitempty"` LabelsAttrs struct { EventA struct { Value string `json:"value,omitempty"` Background string `json:"background,omitempty"` } `json:"Event A,omitempty"` EventB struct { Value string `json:"value,omitempty"` Background string `json:"background,omitempty"` } `json:"Event B,omitempty"` } `json:"labels_attrs,omitempty"` } `json:"label,omitempty"` } `json:"parsed_label_config,omitempty"` EvaluatePredictionsAutomatically bool `json:"evaluate_predictions_automatically,omitempty"` ConfigHasControlTags bool `json:"config_has_control_tags,omitempty"` SkipQueue string `json:"skip_queue,omitempty"` RevealPreannotationsInteractively bool `json:"reveal_preannotations_interactively,omitempty"` PinnedAt any `json:"pinned_at,omitempty"` FinishedTaskNumber int `json:"finished_task_number,omitempty"` QueueTotal int `json:"queue_total,omitempty"` QueueDone int `json:"queue_done,omitempty"` }
type ProjectService ¶
type ProjectService struct {
// contains filtered or unexported fields
}
func NewProjectService ¶
func NewProjectService(client *lshttp.Client) *ProjectService
func (*ProjectService) CreateProject ¶
func (p *ProjectService) CreateProject(ctx context.Context, title, description string, labelConfig LabelConfig) (*lsopenapi.Project, error)
func (*ProjectService) CreateProjectExport ¶
func (p *ProjectService) CreateProjectExport(ctx context.Context, pid int32) (*lsopenapi.ExportCreate, error)
func (*ProjectService) CreateProjectImport ¶
func (p *ProjectService) CreateProjectImport(ctx context.Context, pid int32, data ProjectImportData) (*lsopenapi.TaskCreationResponse, error)
CreateProjectImport import url to the project for labelling. limitation: we now only support one task at a time. FIXME(hsiny): allow batch import
func (*ProjectService) DownloadExport ¶
func (*ProjectService) GetProject ¶
func (*ProjectService) GetProjectExport ¶
Click to show internal directories.
Click to hide internal directories.