Skip to content

Commit dca8696

Browse files
Merge pull request #10440 from cvat-ai/release-2.62.0
Release v2.62.0
2 parents aeabdd0 + a5cdf3f commit dca8696

94 files changed

Lines changed: 1572 additions & 917 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.regal/config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ rules:
2121
# Mainly a style preference
2222
# https://docs.styra.com/regal/rules/style/avoid-get-and-list-prefix
2323
level: ignore
24+
external-reference:
25+
# https://docs.styra.com/regal/rules/style/external-reference
26+
level: ignore
2427
opa-fmt:
2528
# https://docs.styra.com/regal/rules/style/opa-fmt
2629
level: ignore

.vscode/launch.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@
420420
"server: django",
421421
"server: RQ - worker",
422422
"server: RQ - scheduler",
423-
]
423+
],
424+
"stopAll": true,
424425
}
425426
]
426427
}

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
<!-- scriv-insert-here -->
1818

19+
<a id='changelog-2.62.0'></a>
20+
## \[2.62.0\] - 2026-04-02
21+
22+
### Added
23+
24+
- Show success notification after saving annotation guide (<https://github.com/cvat-ai/cvat/pull/10342>)
25+
26+
- Compose for transformers + Helm support for function name env var
27+
(<https://github.com/cvat-ai/cvat/pull/10388>)
28+
29+
### Changed
30+
31+
- The format for filters in Rego policy files has changed; if you have
32+
added custom policy files, you may need to update them
33+
(<https://github.com/cvat-ai/cvat/pull/10387>)
34+
35+
- 'Remove annotations' confirmation message now more user-friendly.
36+
- 'Delete' button renamed to 'Remove' to match the message
37+
(<https://github.com/cvat-ai/cvat/pull/10407>)
38+
39+
- Bounding box is used as a default prompt for SAM models instead of points
40+
(<https://github.com/cvat-ai/cvat/pull/10432>)
41+
42+
- Snap to contour and snap to point features are now accessible on the controls sidebar
43+
(<https://github.com/cvat-ai/cvat/pull/10421>)
44+
45+
### Fixed
46+
47+
- Width misalignment between top bars and content lists (tasks, jobs, projects,
48+
cloud storages, webhooks pages) by applying consistent scrollbar gutter spacing.
49+
(<https://github.com/cvat-ai/cvat/pull/10324>)
50+
51+
- Content size on resource pages for smaller screens (<1000px) to provide better responsive layout
52+
(<https://github.com/cvat-ai/cvat/pull/10324>)
53+
54+
- Exported interpolated shapes in 3D cuboid tracks can have invalid rotation
55+
(<https://github.com/cvat-ai/cvat/pull/10413>)
56+
57+
- Fixed chunk generation in tasks with backing cloud storage where the
58+
manifest contains incomplete paths
59+
(<https://github.com/cvat-ai/cvat/pull/10429>)
60+
1961
<a id='changelog-2.61.0'></a>
2062
## \[2.61.0\] - 2026-03-20
2163

_typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
files.extend-exclude = [
2+
"ai-models/agents_deployment/transformers/supported_models",
23
"cvat-ui/src/assets/opencv_4.8.0.js",
34
"cvat-data/src/ts/3rdparty/*.js",
45
"site/themes/docsy/",

ai-models/agents_deployment/helm/templates/helpers.tpl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,15 @@ Configure command arguments for cvat-cli
9494
- name: MODEL_CONFIG_PARAMS
9595
value: {{ $val | trim | quote }}
9696
{{- end -}}
97+
98+
{{/*
99+
Configure function name for agent
100+
*/}}
101+
{{- define "agent.functionNameEnv" -}}
102+
- name: FUNCTION_NAME
103+
{{- if .Values.agent.function_name }}
104+
value: {{ .Values.agent.function_name | quote }}
105+
{{- else }}
106+
value: "MyAgentFunction"
107+
{{- end }}
108+
{{- end }}

ai-models/agents_deployment/helm/templates/job.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ spec:
2828
command: ["./function_registration.sh"]
2929
env:
3030
{{- include "agent.commonEnv" . | nindent 12 }}
31+
{{- include "agent.functionNameEnv" . | nindent 12 }}
3132
{{- include "agent.modelParamsOverride" . | nindent 12 }}
3233
{{- range .Values.job.envVars }}
3334
- name: {{ .name }}

ai-models/agents_deployment/helm/values.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ image:
88

99
agent:
1010
### Common configuration
11+
# Please specify a unique name for your agent's function. Uniqueness is username + function name.
12+
function_name: "myfunction"
1113
# Please specify the number of agent replicas you want to deploy.
1214
replicaCount: 1
1315
# Please specify the organization slug in CVAT if you want to deploy agent under organization. Else leave empty.
@@ -35,12 +37,19 @@ agent:
3537
model_id:
3638
type: str
3739
value: "facebook/sam2.1-hiera-tiny"
40+
transformers-detr:
41+
model:
42+
type: str
43+
value: "facebook/detr-resnet-50"
44+
task:
45+
type: str
46+
value: "object-detection"
3847
custom:
3948
# use modelParamsOverride to specify custom parameters for your model.
4049

4150
# Please pick a preset for your agent's model configuration. The preset will automatically fill in the necessary parameters for the chosen model type. If you choose a preset, you can still override specific parameters in the `modelParamsOverride` section below.
4251
# Keys with empty 'value' will be ignored.
43-
preset: sam2
52+
preset: transformers-detr
4453
modelParamsOverride: { }
4554
# modelParamsOverride:
4655
# model:
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Docker compose
2+
CVAT_BASE_URL=your_cvat_url # Your CVAT instance URL. Default is https://app.cvat.ai
3+
CVAT_ACCESS_TOKEN=your_cvat_access_token_here # Required to authenticate to CVAT API. You can get it in CVAT UI: https://app.cvat.ai/profile#security
4+
FUNCTION_NAME=your_function_name # Name of the function to create in CVAT.
5+
IMAGE_URL= your_cvat_image_here # Image to use for the agent.
6+
AGENTS_COUNT=1 # Number of agents to create. Default is 1.
7+
ORG_SLUG=your_organization_slug_here # If you want to create agent for your organization.
8+
USE_CUDA=false # Set to true if you want to use GPU. Please ensure that you use right docker image.
9+
10+
# Model config params for transformers
11+
#
12+
# All -p parameters are passed as **kwargs to the create() function in func.py,
13+
# which forwards them to transformers.pipeline(**kwargs).
14+
# Any argument accepted by transformers.pipeline() can be passed here.
15+
#
16+
# Required params:
17+
# task - pipeline task type. Supported values are:
18+
# "object-detection", "image-classification", "image-segmentation"
19+
# model - Hugging Face model ID (the "foo/bar" string from <ModelClass>.from_pretrained("foo/bar")
20+
# in the model's documentation page on https://huggingface.co/docs/transformers)
21+
#
22+
# Optional params:
23+
# device - device to run inference on, e.g. "cpu", "cuda", "cuda:0". Default is "cpu".
24+
#
25+
# How to find the right model ID:
26+
# 1. Pick a model class from the supported list (e.g. DetrForObjectDetection)
27+
# 2. Open its page in Hugging Face Transformers docs
28+
# 3. Scroll to the from_pretrained() example — the string argument is your model ID
29+
# Example: model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
30+
# → model ID is "facebook/detr-resnet-50"
31+
# 4. Alternatively, search for the model class on https://huggingface.co/models
32+
# and use the model's repo name as the model ID
33+
#
34+
# Examples:
35+
# Object detection:
36+
# MODEL_CONFIG_PARAMS="-p task=str:object-detection -p model=str:hustvl/yolos-tiny"
37+
# MODEL_CONFIG_PARAMS="-p task=str:object-detection -p model=str:facebook/detr-resnet-50"
38+
# Image classification:
39+
# MODEL_CONFIG_PARAMS="-p task=str:image-classification -p model=str:microsoft/resnet-50"
40+
# MODEL_CONFIG_PARAMS="-p task=str:image-classification -p model=str:google/vit-base-patch16-224"
41+
# Image segmentation:
42+
# MODEL_CONFIG_PARAMS="-p task=str:image-segmentation -p model=str:facebook/detr-resnet-50-panoptic"
43+
44+
MODEL_CONFIG_PARAMS="-p task=str:object-detection -p model=str:facebook/detr-resnet-50"
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FROM python:3.14-slim
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
curl \
5+
git \
6+
jq \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
ARG USE_GPU=false
10+
ARG TARGETARCH
11+
ADD --chmod=+x https://dl.k8s.io/release/v1.34.0/bin/linux/${TARGETARCH}/kubectl /usr/local/bin/
12+
13+
RUN groupadd --gid 1000 agent && \
14+
useradd --uid 1000 --gid 1000 --create-home agent
15+
16+
WORKDIR /app
17+
18+
RUN mkdir /shared && chown agent:agent /shared && chown agent:agent /app
19+
20+
COPY ai-models/detector/transformers/requirements.txt .
21+
22+
RUN if [ "$USE_GPU" = "true" ] && [ "$TARGETARCH" = "amd64" ]; then \
23+
echo "Building GPU image" && pip install --no-cache-dir cvat-cli -r requirements.txt; \
24+
else \
25+
echo "Building CPU only image" && pip install --no-cache-dir cvat-cli -r requirements.txt --extra-index-url=https://download.pytorch.org/whl/cpu; \
26+
fi
27+
28+
COPY ai-models/detector/transformers/ .
29+
COPY --chmod=755 ai-models/agents_deployment/transformers/function_registration.sh .
30+
COPY --chmod=755 ai-models/agents_deployment/transformers/function_deregistration.sh .
31+
COPY --chmod=755 ai-models/agents_deployment/transformers/check_env.sh .
32+
COPY --chmod=755 ai-models/agents_deployment/transformers/entrypoint.sh .
33+
34+
USER agent
35+
36+
ENTRYPOINT ["./entrypoint.sh"]
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/bin/bash
2+
3+
validate_access_token() {
4+
if [ -z "$CVAT_ACCESS_TOKEN" ]; then
5+
echo "Error: CVAT_ACCESS_TOKEN environment variable must be set."
6+
exit 1
7+
fi
8+
}
9+
10+
resolve_base_url() {
11+
if [ -z "$CVAT_BASE_URL" ]; then
12+
echo "Warning: CVAT_BASE_URL environment variable is missing, using https://app.cvat.ai as default."
13+
CVAT_BASE_URL="https://app.cvat.ai"
14+
fi
15+
}
16+
17+
resolve_org_slug() {
18+
ORG_SLUG_ARGS=()
19+
if [ -z "$ORG_SLUG" ]; then
20+
echo "Warning: ORG_SLUG environment variable not found. Function will be registered only for your user."
21+
echo "ORG_SLUG must be the short name of the organization; it is the name displayed under your username when you switch to the organization in the CVAT UI."
22+
ORG_CURL_ARGS=(--data-urlencode "org=")
23+
else
24+
echo "Using organization: $ORG_SLUG"
25+
ORG_SLUG_ARGS=(--organization "$ORG_SLUG")
26+
ORG_CURL_ARGS=(--data-urlencode "org=$ORG_SLUG")
27+
fi
28+
}
29+
30+
resolve_cuda() {
31+
if [ "$USE_CUDA" = "true" ]; then
32+
echo "Using CUDA! Please ensure that you are using proper image with CUDA support"
33+
USE_CUDA_ARGS=(-p device=str:cuda)
34+
else
35+
echo "Info: USE_CUDA environment variable not found. Model will run on CPU."
36+
fi
37+
}
38+
39+
resolve_model_params() {
40+
if [ -z "$MODEL_CONFIG_PARAMS" ]; then
41+
echo "Warning: MODEL_CONFIG_PARAMS environment variable not found. Default model will be used: facebook/detr-resnet-50"
42+
MODEL_CONFIG_PARAMS="-p model=facebook/detr-resnet-50"
43+
MODEL="-p task=str:object-detection -p model=str:facebook/detr-resnet-50"
44+
elif result=$(echo "$MODEL_CONFIG_PARAMS" | grep -oP 'model=str:\K[^ ]+'); then
45+
echo "Extracted MODEL from MODEL_CONFIG_PARAMS: $result"
46+
MODEL="$result"
47+
else
48+
echo "Warning: MODEL_CONFIG_PARAMS environment variable is set but model param is malformed. Your config will be discarded. Default values will be used."
49+
echo "MODEL_CONFIG_PARAMS should contain model in format -p model=str:your_model_name"
50+
echo "Following params will be used for cvat-cli: -p task=str:object-detection -p model=str:facebook/detr-resnet-50"
51+
MODEL_CONFIG_PARAMS="-p task=str:object-detection -p model=str:facebook/detr-resnet-50"
52+
MODEL="facebook/detr-resnet-50"
53+
fi
54+
}
55+
56+
resolve_function_name() {
57+
if [ -z "$FUNCTION_NAME" ]; then
58+
echo "Warning: FUNCTION_NAME environment variable not found. Default is TRANSFORMERS"
59+
FUNCTION_NAME="TRANSFORMERS"
60+
else
61+
echo "Using FUNCTION_NAME: $FUNCTION_NAME"
62+
fi
63+
}
64+
65+
common_env() {
66+
validate_access_token
67+
resolve_base_url
68+
resolve_org_slug
69+
}

0 commit comments

Comments
 (0)