geti-using-the-pipeline
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUsing the Geti pipeline (application)
使用Geti流程(应用层)
The Geti application is a FastAPI server (, the
package) that exposes a REST API for the full computer-vision workflow: create a
project, upload and annotate media, train a model as an async job,
then configure and enable a live inference pipeline (source → model →
sink). This skill is about using that API; to change backend code use the
skill instead.
application/backend/getigeti-backend-devStart the server from with (default
). The full endpoint reference is
; interactive docs are the generated OpenAPI spec.
application/backend/just run-serverhttps://localhost:7860application/docs/api.mdGeti应用是一个FastAPI服务器(位于目录,对应包),它暴露REST API以支持完整的计算机视觉工作流:创建项目,上传并标注媒体资源,以异步任务形式训练模型,然后配置并启用实时推理流程(数据源→模型→输出端)。本技能聚焦于该API的使用;若需修改后端代码,请使用技能。
application/backend/getigeti-backend-dev从目录执行启动服务器(默认地址为)。完整的接口参考文档位于;交互式文档为生成的OpenAPI规范。
application/backend/just run-serverhttps://localhost:7860application/docs/api.mdEnd-to-end pipeline
端到端流程
mermaid
flowchart LR
A[Create project] --> B[Upload media]
B --> C[Annotate media]
C --> D[Train job]
D --> E[Configure pipeline: source, model, sink]
E --> F[Enable pipeline / live inference]- Create a project with a task type and labels.
- (name, task, labels) → project info.
POST /api/projects - Done when: returns the project with its labels.
GET /api/projects/<id>
- Upload media (images/videos) to the project dataset.
- (binary) → media info.
POST /api/projects/<id>/dataset/media - Done when: lists the uploaded item.
GET /api/projects/<id>/dataset/media
- Annotate media so the dataset is trainable.
- (annotation info).
POST /api/projects/<id>/dataset/media/<media_id>/annotations - Done when: returns the saved annotation.
GET .../annotations - (Optional) import an existing dataset instead via the dataset jobs below.
- Train a model as an async job.
- with job type
POST /api/jobs→ job id.train - Track it: , stream
GET /api/jobs/<id>andGET /api/jobs/<id>/status; cancel withGET /api/jobs/<id>/logs.POST /api/jobs/<id>:cancel - Done when: the job reaches a finished state and
lists the new model.
GET /api/projects/<id>/models
- (Optional) Quantize the trained model for faster inference.
- with job type
POST /api/jobs.quantize - Done when: the quantized model variant appears under the project's models.
- Configure the inference pipeline — bind a source, the model, and a sink.
- Sources: ; sinks:
POST /api/sources.POST /api/sinks - with the ids of source, sink, and model.
PATCH /api/projects/<id>/pipeline - Done when: shows the wired components.
GET /api/projects/<id>/pipeline
- Sources:
- Enable live inference and monitor it.
- (disable with
POST /api/projects/<id>/pipeline:enable).:disable - Metrics: (latency, throughput).
GET /api/projects/<id>/pipeline/metrics - collects the next frame into the dataset for continued annotation/retraining.
POST /api/projects/<id>/pipeline:capture - Done when: the pipeline reports active and metrics update.
mermaid
flowchart LR
A[Create project] --> B[Upload media]
B --> C[Annotate media]
C --> D[Train job]
D --> E[Configure pipeline: source, model, sink]
E --> F[Enable pipeline / live inference]- 创建项目,指定任务类型和标签。
- 调用(传入名称、任务类型、标签)→ 返回项目信息。
POST /api/projects - 完成标志:返回包含标签的项目详情。
GET /api/projects/<id>
- 调用
- 上传媒体资源(图片/视频)到项目数据集。
- 调用(传入二进制文件)→ 返回媒体资源信息。
POST /api/projects/<id>/dataset/media - 完成标志:列出已上传的资源。
GET /api/projects/<id>/dataset/media
- 调用
- 标注媒体资源,使数据集可用于训练。
- 调用(传入标注信息)。
POST /api/projects/<id>/dataset/media/<media_id>/annotations - 完成标志:返回已保存的标注内容。
GET .../annotations - (可选)通过下方的数据集任务导入现有数据集,替代手动标注。
- 调用
- 以异步任务形式训练模型。
- 调用并指定任务类型为
POST /api/jobs→ 返回任务ID。train - 跟踪任务:调用,或流式获取
GET /api/jobs/<id>和GET /api/jobs/<id>/status;调用GET /api/jobs/<id>/logs可取消任务。POST /api/jobs/<id>:cancel - 完成标志:任务进入完成状态,且列出新模型。
GET /api/projects/<id>/models
- 调用
- (可选)量化训练后的模型以提升推理速度。
- 调用并指定任务类型为
POST /api/jobs。quantize - 完成标志:量化后的模型变体出现在项目模型列表中。
- 调用
- 配置推理流程——绑定数据源、模型和输出端。
- 创建数据源:;创建输出端:
POST /api/sources。POST /api/sinks - 调用并传入数据源、输出端和模型的ID。
PATCH /api/projects/<id>/pipeline - 完成标志:显示已绑定的组件。
GET /api/projects/<id>/pipeline
- 创建数据源:
- 启用实时推理并监控。
- 调用(调用
POST /api/projects/<id>/pipeline:enable可关闭)。:disable - 查看指标:(延迟、吞吐量)。
GET /api/projects/<id>/pipeline/metrics - 调用可将下一帧采集到数据集,用于后续标注/再训练。
POST /api/projects/<id>/pipeline:capture - 完成标志:流程报告处于活跃状态,且指标持续更新。
- 调用
The async job model
异步任务模型
Long-running work runs as jobs (), keeping the API
responsive. Job types: , , ,
, ,
, . Poll or stream
and ; jobs are cancelable.
POST /api/jobstrainquantizeprepare_dataset_for_importimport_dataset_to_existing_projectimport_dataset_as_new_projectexport_datasetstage_datasetGET /api/jobs/<id>/status/logs耗时操作以任务形式运行(调用),确保API响应性。任务类型包括:、、、、、、。可轮询或流式获取和;任务支持取消操作。
POST /api/jobstrainquantizeprepare_dataset_for_importimport_dataset_to_existing_projectimport_dataset_as_new_projectexport_datasetstage_datasetGET /api/jobs/<id>/status/logsDatasets: import instead of manual annotation
数据集:导入替代手动标注
To bring in an existing dataset rather than annotating from scratch:
- Upload an archive to staging: .
POST /api/staged_datasets - Then submit an import job (or
import_dataset_as_new_project) viaimport_dataset_to_existing_project.POST /api/jobs - Export a project's dataset with the job.
export_dataset
若无需从头标注,可导入现有数据集:
- 将归档文件上传到暂存区:。
POST /api/staged_datasets - 然后通过提交导入任务(
POST /api/jobs或import_dataset_as_new_project)。import_dataset_to_existing_project - 调用任务可导出项目数据集。
export_dataset
Notes
注意事项
- Training and quantization jobs run out-of-process and call into the library; the underlying capabilities map to the
getituneandgetitune-training-a-modelskills.getitune-optimizing-a-model - This skill covers API usage; endpoint paths and payloads are the contract in
. To add or change endpoints, use
application/docs/api.mdandgeti-backend-dev.geti-openapi-sync
- 训练和量化任务在进程外运行,并调用库;其底层能力对应
getitune和getitune-training-a-model技能。getitune-optimizing-a-model - 本技能涵盖API使用;接口路径和请求体是中定义的契约。若需添加或修改接口,请使用
application/docs/api.md和geti-backend-dev技能。geti-openapi-sync
Related skills
相关技能
- /
getitune-training-a-model— the library capabilities behind thegetitune-optimizing-a-modelandtrainjobs.quantize - — change the backend/API itself.
geti-backend-dev - — the web UI that drives this same API.
geti-ui-dev
- /
getitune-training-a-model——getitune-optimizing-a-model和train任务背后的库能力。quantize - —— 修改后端/API本身。
geti-backend-dev - —— 调用同一API的Web前端界面。
geti-ui-dev