vaapi 0.7.30__tar.gz → 0.7.32__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vaapi-0.7.30/vaapi.egg-info → vaapi-0.7.32}/PKG-INFO +3 -4
- {vaapi-0.7.30 → vaapi-0.7.32}/pyproject.toml +3 -5
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/__init__.py +1 -1
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/video.py +2 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/videos/client.py +4 -0
- {vaapi-0.7.30 → vaapi-0.7.32/vaapi.egg-info}/PKG-INFO +3 -4
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi.egg-info/SOURCES.txt +0 -41
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi.egg-info/requires.txt +1 -1
- vaapi-0.7.30/.github/workflows/deploy_sdk.yml +0 -24
- vaapi-0.7.30/.gitignore +0 -9
- vaapi-0.7.30/examples/README.md +0 -18
- vaapi-0.7.30/examples/annotation_demo.py +0 -41
- vaapi-0.7.30/examples/ballcanditates.py +0 -22
- vaapi-0.7.30/examples/basics.py +0 -33
- vaapi-0.7.30/examples/behavior_demo.py +0 -14
- vaapi-0.7.30/examples/broken_demos/annotation_example.py +0 -26
- vaapi-0.7.30/examples/broken_demos/find_kicks_near_goal.py +0 -59
- vaapi-0.7.30/examples/broken_demos/frame_filter_example.py +0 -26
- vaapi-0.7.30/examples/broken_demos/frame_times.py +0 -26
- vaapi-0.7.30/examples/broken_demos/heatmap.py +0 -110
- vaapi-0.7.30/examples/bulk_image_update.py +0 -22
- vaapi-0.7.30/examples/file_upload.py +0 -21
- vaapi-0.7.30/examples/filter_behavior_demo.py +0 -99
- vaapi-0.7.30/examples/fix_images.py +0 -43
- vaapi-0.7.30/examples/get_annotations.py +0 -17
- vaapi-0.7.30/examples/get_frame_per_video_timestamp.py +0 -46
- vaapi-0.7.30/examples/get_game_model_data.py +0 -18
- vaapi-0.7.30/examples/get_image.py +0 -17
- vaapi-0.7.30/examples/get_log_model_data.py +0 -23
- vaapi-0.7.30/examples/get_teams.py +0 -17
- vaapi-0.7.30/examples/get_video_model_data.py +0 -35
- vaapi-0.7.30/examples/image_demo.py +0 -90
- vaapi-0.7.30/examples/image_pagination.py +0 -38
- vaapi-0.7.30/examples/imu_demo.py +0 -39
- vaapi-0.7.30/examples/mmap_local_demo.py +0 -42
- vaapi-0.7.30/examples/num_kicks_demo.py +0 -57
- vaapi-0.7.30/examples/num_kicks_demo_interactive.py +0 -66
- vaapi-0.7.30/examples/requirements.txt +0 -4
- vaapi-0.7.30/examples/robot.py +0 -11
- vaapi-0.7.30/examples/slice.py +0 -9
- vaapi-0.7.30/examples/team_demo.py +0 -19
- vaapi-0.7.30/package_pypi.sh +0 -13
- vaapi-0.7.30/renovate.json +0 -6
- vaapi-0.7.30/tests/run_tests.py +0 -26
- vaapi-0.7.30/tests/tests/cognition_repr_test.py +0 -20
- vaapi-0.7.30/tests/tests/event_tests.py +0 -25
- vaapi-0.7.30/tests/tests/game_tests.py +0 -22
- vaapi-0.7.30/tests/tests/logs_tests.py +0 -18
- vaapi-0.7.30/tests/tests/motion_repr_test.py +0 -20
- {vaapi-0.7.30 → vaapi-0.7.32}/README.md +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/setup.cfg +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/base_client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/behavior_frame_option/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/behavior_frame_option/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/behavior_options/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/behavior_options/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/behavior_options_state/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/behavior_options_state/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/cognition_frame/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/cognition_frame/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/cognition_representation/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/cognition_representation/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/api_error.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/client_wrapper.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/datetime_utils.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/file.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/http_client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/jsonable_encoder.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/pagination.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/pydantic_utilities.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/query_encoder.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/remove_none_from_dict.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/core/request_options.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/events/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/events/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/experiment/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/experiment/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/game/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/game/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/image/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/image/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/log_status/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/log_status/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/logs/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/logs/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/motion_frame/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/motion_frame/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/motion_representation/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/motion_representation/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/robots/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/robots/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/teams/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/teams/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/timeline/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/timeline/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/annotation.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/behavior_option.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/behavior_option_state.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/behaviorframe_options.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/cognition_frame.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/cognition_representation.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/event.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/experiment.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/frame_filter.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/game.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/image.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/log.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/log_status.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/motion_frame.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/motion_representation.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/robots.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/teams.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/timeline.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/xabsl_symbol_complete.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/types/xabsl_symbol_sparse.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/videos/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/xabsl_symbol_complete/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/xabsl_symbol_complete/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/xabsl_symbol_sparse/__init__.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi/xabsl_symbol_sparse/client.py +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi.egg-info/dependency_links.txt +0 -0
- {vaapi-0.7.30 → vaapi-0.7.32}/vaapi.egg-info/top_level.txt +0 -0
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vaapi
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.32
|
|
4
4
|
Summary: Python utils for adding logs to our Visual Analytics Tool
|
|
5
5
|
Author-email: NaoTH Berlin United <nao-team@informatik.hu-berlin.de>
|
|
6
|
-
License: Apache-2.0
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
9
8
|
Classifier: Operating System :: OS Independent
|
|
10
9
|
Requires-Python: >=3.10.9
|
|
11
10
|
Description-Content-Type: text/markdown
|
|
12
11
|
Requires-Dist: protobuf==3.20.3
|
|
13
12
|
Requires-Dist: httpx==0.28.1
|
|
14
13
|
Requires-Dist: pydantic==2.12.5
|
|
15
|
-
Requires-Dist: requests==2.
|
|
14
|
+
Requires-Dist: requests==2.33.1
|
|
16
15
|
|
|
17
16
|
# Berlin United - Visual Analytics Tool
|
|
18
17
|
Work in progress for an Analytics tool tailored to the needs of RoboCup SPL.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=
|
|
2
|
+
requires = ["setuptools>=61", "wheel"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
@@ -10,20 +10,18 @@ authors = [
|
|
|
10
10
|
description = "Python utils for adding logs to our Visual Analytics Tool"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
requires-python = ">=3.10.9"
|
|
13
|
-
license =
|
|
13
|
+
license = "Apache-2.0"
|
|
14
14
|
classifiers = [
|
|
15
15
|
"Programming Language :: Python :: 3",
|
|
16
|
-
"License :: OSI Approved :: Apache Software License",
|
|
17
16
|
"Operating System :: OS Independent",
|
|
18
17
|
]
|
|
19
18
|
dynamic = ["version"]
|
|
20
|
-
#[tool.setuptools_scm]
|
|
21
19
|
|
|
22
20
|
dependencies = [
|
|
23
21
|
"protobuf==3.20.3",
|
|
24
22
|
"httpx==0.28.1",
|
|
25
23
|
"pydantic==2.12.5",
|
|
26
|
-
"requests==2.
|
|
24
|
+
"requests==2.33.1",
|
|
27
25
|
]
|
|
28
26
|
|
|
29
27
|
[tool.setuptools.dynamic]
|
|
@@ -21,6 +21,8 @@ class Video(pydantic_v1.BaseModel):
|
|
|
21
21
|
|
|
22
22
|
type: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
23
23
|
|
|
24
|
+
labelstudio_url: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
25
|
+
|
|
24
26
|
comment: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
25
27
|
|
|
26
28
|
def json(self, **kwargs: typing.Any) -> str:
|
|
@@ -79,6 +79,7 @@ class VideoClient:
|
|
|
79
79
|
video_path: typing.Optional[str] = OMIT,
|
|
80
80
|
url: typing.Optional[str] = OMIT,
|
|
81
81
|
type: typing.Optional[str] = OMIT,
|
|
82
|
+
labelstudio_url: typing.Optional[str] = OMIT,
|
|
82
83
|
comment: typing.Optional[str] = OMIT,
|
|
83
84
|
request_options: typing.Optional[RequestOptions] = None,
|
|
84
85
|
) -> Video:
|
|
@@ -101,6 +102,7 @@ class VideoClient:
|
|
|
101
102
|
"video_path": video_path,
|
|
102
103
|
"url": url,
|
|
103
104
|
"type": type,
|
|
105
|
+
"labelstudio_url": labelstudio_url,
|
|
104
106
|
"comment": comment,
|
|
105
107
|
},
|
|
106
108
|
request_options=request_options,
|
|
@@ -155,6 +157,7 @@ class VideoClient:
|
|
|
155
157
|
video_path: typing.Optional[str] = OMIT,
|
|
156
158
|
url: typing.Optional[str] = OMIT,
|
|
157
159
|
type: typing.Optional[str] = OMIT,
|
|
160
|
+
labelstudio_url: typing.Optional[str] = OMIT,
|
|
158
161
|
comment: typing.Optional[str] = OMIT,
|
|
159
162
|
request_options: typing.Optional[RequestOptions] = None,
|
|
160
163
|
) -> Video:
|
|
@@ -177,6 +180,7 @@ class VideoClient:
|
|
|
177
180
|
"video_path": video_path,
|
|
178
181
|
"url": url,
|
|
179
182
|
"type": type,
|
|
183
|
+
"labelstudio_url": labelstudio_url,
|
|
180
184
|
"comment": comment,
|
|
181
185
|
},
|
|
182
186
|
request_options=request_options,
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vaapi
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.32
|
|
4
4
|
Summary: Python utils for adding logs to our Visual Analytics Tool
|
|
5
5
|
Author-email: NaoTH Berlin United <nao-team@informatik.hu-berlin.de>
|
|
6
|
-
License: Apache-2.0
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
9
8
|
Classifier: Operating System :: OS Independent
|
|
10
9
|
Requires-Python: >=3.10.9
|
|
11
10
|
Description-Content-Type: text/markdown
|
|
12
11
|
Requires-Dist: protobuf==3.20.3
|
|
13
12
|
Requires-Dist: httpx==0.28.1
|
|
14
13
|
Requires-Dist: pydantic==2.12.5
|
|
15
|
-
Requires-Dist: requests==2.
|
|
14
|
+
Requires-Dist: requests==2.33.1
|
|
16
15
|
|
|
17
16
|
# Berlin United - Visual Analytics Tool
|
|
18
17
|
Work in progress for an Analytics tool tailored to the needs of RoboCup SPL.
|
|
@@ -1,46 +1,5 @@
|
|
|
1
|
-
.gitignore
|
|
2
1
|
README.md
|
|
3
|
-
package_pypi.sh
|
|
4
2
|
pyproject.toml
|
|
5
|
-
renovate.json
|
|
6
|
-
.github/workflows/deploy_sdk.yml
|
|
7
|
-
examples/README.md
|
|
8
|
-
examples/annotation_demo.py
|
|
9
|
-
examples/ballcanditates.py
|
|
10
|
-
examples/basics.py
|
|
11
|
-
examples/behavior_demo.py
|
|
12
|
-
examples/bulk_image_update.py
|
|
13
|
-
examples/file_upload.py
|
|
14
|
-
examples/filter_behavior_demo.py
|
|
15
|
-
examples/fix_images.py
|
|
16
|
-
examples/get_annotations.py
|
|
17
|
-
examples/get_frame_per_video_timestamp.py
|
|
18
|
-
examples/get_game_model_data.py
|
|
19
|
-
examples/get_image.py
|
|
20
|
-
examples/get_log_model_data.py
|
|
21
|
-
examples/get_teams.py
|
|
22
|
-
examples/get_video_model_data.py
|
|
23
|
-
examples/image_demo.py
|
|
24
|
-
examples/image_pagination.py
|
|
25
|
-
examples/imu_demo.py
|
|
26
|
-
examples/mmap_local_demo.py
|
|
27
|
-
examples/num_kicks_demo.py
|
|
28
|
-
examples/num_kicks_demo_interactive.py
|
|
29
|
-
examples/requirements.txt
|
|
30
|
-
examples/robot.py
|
|
31
|
-
examples/slice.py
|
|
32
|
-
examples/team_demo.py
|
|
33
|
-
examples/broken_demos/annotation_example.py
|
|
34
|
-
examples/broken_demos/find_kicks_near_goal.py
|
|
35
|
-
examples/broken_demos/frame_filter_example.py
|
|
36
|
-
examples/broken_demos/frame_times.py
|
|
37
|
-
examples/broken_demos/heatmap.py
|
|
38
|
-
tests/run_tests.py
|
|
39
|
-
tests/tests/cognition_repr_test.py
|
|
40
|
-
tests/tests/event_tests.py
|
|
41
|
-
tests/tests/game_tests.py
|
|
42
|
-
tests/tests/logs_tests.py
|
|
43
|
-
tests/tests/motion_repr_test.py
|
|
44
3
|
vaapi/__init__.py
|
|
45
4
|
vaapi/base_client.py
|
|
46
5
|
vaapi/client.py
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
name: GitHub Actions Demo
|
|
2
|
-
run-name: ${{ github.actor }} is deploying the sdk 🚀
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
push:
|
|
6
|
-
branches: ['main']
|
|
7
|
-
env:
|
|
8
|
-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
Explore-GitHub-Actions:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- name: Check out repository code
|
|
15
|
-
uses: actions/checkout@v4
|
|
16
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
17
|
-
uses: actions/setup-python@v5
|
|
18
|
-
with:
|
|
19
|
-
python-version: "3.12"
|
|
20
|
-
- run: python -m pip install --upgrade pip setuptools wheel twine
|
|
21
|
-
- name: Deploy sdk to pypi
|
|
22
|
-
run: |
|
|
23
|
-
/bin/bash package_pypi.sh
|
|
24
|
-
- run: echo "🍏 This job's status is ${{ job.status }}."
|
vaapi-0.7.30/.gitignore
DELETED
vaapi-0.7.30/examples/README.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
## Demos for the Berlin United Visual Analytics Tool
|
|
2
|
-
|
|
3
|
-
## Setup
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
python3 -m venv venv
|
|
7
|
-
source venv/bin/activate
|
|
8
|
-
|
|
9
|
-
python -m pip install -r requirements.txt
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
You need to the environment variables for the URL and the API token.
|
|
13
|
-
```
|
|
14
|
-
export VAT_API_URL=<http://127.0.0.1:8000/ or https://vat.berlin-united.com/>
|
|
15
|
-
export VAT_API_TOKEN=<your token>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
If you are using vat.berlin-united.com you should have received a token from the admin. If you are using the self hosted version you can get the token by login to the django admin panel.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
from vaapi.client import Vaapi
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def list_annotations_per_log():
|
|
6
|
-
log = client.logs.list()
|
|
7
|
-
|
|
8
|
-
def sort_key_fn(log):
|
|
9
|
-
return log.id
|
|
10
|
-
|
|
11
|
-
for log in sorted(log, key=sort_key_fn):
|
|
12
|
-
count = client.annotations.count(
|
|
13
|
-
log=log.id, class_name="ball", validated=False
|
|
14
|
-
)["count"]
|
|
15
|
-
if count < 100 and count > 0:
|
|
16
|
-
print(f"{log.id} - {count} ball annotations")
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def print_annotation_stats():
|
|
20
|
-
# FIXME we cant filter for camera yet
|
|
21
|
-
all_annotations = client.annotations.count(type='bbox',class_name="ball")["count"]
|
|
22
|
-
validated_annotations = client.annotations.count(type='bbox',class_name="ball", validated=True)[
|
|
23
|
-
"count"
|
|
24
|
-
]
|
|
25
|
-
|
|
26
|
-
validation_progress = (validated_annotations / all_annotations) * 100
|
|
27
|
-
|
|
28
|
-
print(f"Percent of Ball Annotations validated: {validation_progress}%")
|
|
29
|
-
print(
|
|
30
|
-
f"You already validated {validated_annotations} Ball Annotations of of {all_annotations}"
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if __name__ == "__main__":
|
|
35
|
-
client = Vaapi(
|
|
36
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
37
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
print_annotation_stats()
|
|
41
|
-
# list_annotations_per_log()
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Similar to
|
|
3
|
-
response = client.ballcandidates.list(
|
|
4
|
-
log_id=1,
|
|
5
|
-
)
|
|
6
|
-
|
|
7
|
-
you can use any representation name present in the game.log to query it except behavior. Behavior is handled differently.
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
from vaapi.client import Vaapi
|
|
11
|
-
import os
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if __name__ == "__main__":
|
|
15
|
-
client = Vaapi(
|
|
16
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
17
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
18
|
-
)
|
|
19
|
-
response = client.ballcandidates.list(
|
|
20
|
-
log=1,
|
|
21
|
-
)
|
|
22
|
-
print(response)
|
vaapi-0.7.30/examples/basics.py
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
from vaapi.client import Vaapi
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def get_logs():
|
|
6
|
-
response = client.logs.list()
|
|
7
|
-
for log in response:
|
|
8
|
-
print(f"{log.game} - Player: {log.player_number}")
|
|
9
|
-
|
|
10
|
-
# you can print all fields of a log with:
|
|
11
|
-
# response[0].dict()
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def get_games():
|
|
15
|
-
response = client.games.list()
|
|
16
|
-
for game in response:
|
|
17
|
-
print(game)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def get_experiments():
|
|
21
|
-
response = client.experiment.list()
|
|
22
|
-
for experiment in response:
|
|
23
|
-
print(experiment)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if __name__ == "__main__":
|
|
27
|
-
client = Vaapi(
|
|
28
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
29
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
30
|
-
)
|
|
31
|
-
get_games()
|
|
32
|
-
get_logs()
|
|
33
|
-
get_experiments()
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
from vaapi.client import Vaapi
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
def get_all_states_for_option():
|
|
5
|
-
behavior_option = client.behavior_option.list(log=282,option_name="fall_down_and_stand_up")
|
|
6
|
-
behavior_option_states = client.behavior_option_state.list(log=282,option_id=behavior_option[0].id)
|
|
7
|
-
print(behavior_option_states)
|
|
8
|
-
|
|
9
|
-
if __name__ == "__main__":
|
|
10
|
-
client = Vaapi(
|
|
11
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
12
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
13
|
-
)
|
|
14
|
-
get_all_states_for_option()
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
from vaapi.client import Vaapi
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if __name__ == "__main__":
|
|
6
|
-
client = Vaapi(
|
|
7
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
8
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
resp = client.annotations.create(
|
|
12
|
-
image_id=2,
|
|
13
|
-
annotation={
|
|
14
|
-
"bbox": [
|
|
15
|
-
{
|
|
16
|
-
"x": 170,
|
|
17
|
-
"y": 280,
|
|
18
|
-
"id": 123,
|
|
19
|
-
"label": "ball",
|
|
20
|
-
"width": 100,
|
|
21
|
-
"height": 100,
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
)
|
|
26
|
-
print(resp)
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
""" """
|
|
2
|
-
|
|
3
|
-
from vaapi.client import Vaapi
|
|
4
|
-
import os
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def group_consecutive_integers(numbers):
|
|
8
|
-
if not numbers:
|
|
9
|
-
return []
|
|
10
|
-
|
|
11
|
-
# Sort the list
|
|
12
|
-
sorted_numbers = sorted(numbers)
|
|
13
|
-
|
|
14
|
-
# Initialize the result and the first group
|
|
15
|
-
result = []
|
|
16
|
-
current_group = [sorted_numbers[0]]
|
|
17
|
-
|
|
18
|
-
# Iterate through the sorted list starting from the second element
|
|
19
|
-
for num in sorted_numbers[1:]:
|
|
20
|
-
if num == current_group[-1] + 1:
|
|
21
|
-
# If the number is consecutive, add it to the current group
|
|
22
|
-
current_group.append(num)
|
|
23
|
-
else:
|
|
24
|
-
# If there's a gap, add the current group to the result and start a new group
|
|
25
|
-
result.append(current_group)
|
|
26
|
-
current_group = [num]
|
|
27
|
-
|
|
28
|
-
# Add the last group
|
|
29
|
-
result.append(current_group)
|
|
30
|
-
|
|
31
|
-
return result
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def find_kick_frames(client):
|
|
35
|
-
response = client.behavior_frame_option.filter(
|
|
36
|
-
log_id=168,
|
|
37
|
-
option_name="path_striker2024",
|
|
38
|
-
state_name="forwardkick",
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
grouped_numbers = group_consecutive_integers(response)
|
|
42
|
-
print(f"Number of times the robot tried to kick: {len(grouped_numbers)}")
|
|
43
|
-
for group in grouped_numbers:
|
|
44
|
-
print(group[0])
|
|
45
|
-
# TODO find the location in the xabsl symbols
|
|
46
|
-
symbols = client.xabsl_symbol_sparse.list(log_id=168, frame=group[0])
|
|
47
|
-
|
|
48
|
-
print(symbols[0].data["input"]["robot_pose.planned.x"])
|
|
49
|
-
|
|
50
|
-
quit()
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if __name__ == "__main__":
|
|
54
|
-
client = Vaapi(
|
|
55
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
56
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
find_kick_frames(client)
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
from vaapi.client import Vaapi
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def frame_filter_demo(client):
|
|
6
|
-
response = client.behavior_frame_option.filter(
|
|
7
|
-
log_id=168,
|
|
8
|
-
option_name="path_striker2024",
|
|
9
|
-
state_name="forwardkick",
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
# publish the frames list
|
|
13
|
-
resp = client.frame_filter.create(
|
|
14
|
-
log_id=168,
|
|
15
|
-
frames={"frame_list": response},
|
|
16
|
-
)
|
|
17
|
-
print(resp)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if __name__ == "__main__":
|
|
21
|
-
client = Vaapi(
|
|
22
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
23
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
frame_filter_demo(client)
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
from vaapi.client import Vaapi
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if __name__ == "__main__":
|
|
6
|
-
client = Vaapi(
|
|
7
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
8
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
9
|
-
)
|
|
10
|
-
"""
|
|
11
|
-
Get FrameInfo from Cognition Process
|
|
12
|
-
"""
|
|
13
|
-
response = client.cognition_repr.list(
|
|
14
|
-
log_id=168,
|
|
15
|
-
representation_name="FrameInfo",
|
|
16
|
-
)
|
|
17
|
-
print(response[0])
|
|
18
|
-
|
|
19
|
-
"""
|
|
20
|
-
Get FrameInfo from Motion Process
|
|
21
|
-
"""
|
|
22
|
-
response = client.motion_repr.list(
|
|
23
|
-
log_id=168,
|
|
24
|
-
representation_name="FrameInfo",
|
|
25
|
-
)
|
|
26
|
-
print(response[0])
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
""" """
|
|
2
|
-
|
|
3
|
-
from vaapi.client import Vaapi
|
|
4
|
-
import os
|
|
5
|
-
import numpy as np
|
|
6
|
-
import matplotlib.pyplot as plt
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def candidates_distribution(logs):
|
|
10
|
-
x_list = list()
|
|
11
|
-
y_list = list()
|
|
12
|
-
for data in logs:
|
|
13
|
-
response = client.cognition_repr.list(
|
|
14
|
-
log_id=data.id,
|
|
15
|
-
representation_name="BallCandidates",
|
|
16
|
-
)
|
|
17
|
-
print(len(response))
|
|
18
|
-
|
|
19
|
-
for candidates in response:
|
|
20
|
-
patch_list = candidates.representation_data["patches"]
|
|
21
|
-
for patch in patch_list:
|
|
22
|
-
mid_x = (patch["max"]["x"] + patch["min"]["x"]) / 2
|
|
23
|
-
mid_y = (patch["max"]["y"] + patch["min"]["y"]) / 2
|
|
24
|
-
x_list.append(mid_x)
|
|
25
|
-
y_list.append(mid_y)
|
|
26
|
-
break
|
|
27
|
-
|
|
28
|
-
fig, ax = plt.subplots()
|
|
29
|
-
plt.title("Frequency of Ball Canditates found in Image")
|
|
30
|
-
h = ax.hist2d(x_list, y_list, bins=[np.arange(0, 640, 20), np.arange(0, 480, 20)])
|
|
31
|
-
fig.colorbar(h[3], ax=ax)
|
|
32
|
-
plt.savefig("candidates_distribution.png")
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def candidates_top_distribution(logs):
|
|
36
|
-
x_list = list()
|
|
37
|
-
y_list = list()
|
|
38
|
-
for data in logs:
|
|
39
|
-
response = client.cognition_repr.list(
|
|
40
|
-
log_id=data.id,
|
|
41
|
-
representation_name="BallCandidatesTop",
|
|
42
|
-
)
|
|
43
|
-
print(len(response))
|
|
44
|
-
|
|
45
|
-
for candidates in response:
|
|
46
|
-
patch_list = candidates.representation_data["patches"]
|
|
47
|
-
for patch in patch_list:
|
|
48
|
-
mid_x = (patch["max"]["x"] + patch["min"]["x"]) / 2
|
|
49
|
-
mid_y = (patch["max"]["y"] + patch["min"]["y"]) / 2
|
|
50
|
-
x_list.append(mid_x)
|
|
51
|
-
y_list.append(mid_y)
|
|
52
|
-
break
|
|
53
|
-
|
|
54
|
-
fig, ax = plt.subplots()
|
|
55
|
-
plt.title("Frequency of Ball Canditates found in Image Top")
|
|
56
|
-
h = ax.hist2d(x_list, y_list, bins=[np.arange(0, 640, 20), np.arange(0, 480, 20)])
|
|
57
|
-
fig.colorbar(h[3], ax=ax)
|
|
58
|
-
plt.savefig("candidates_top_distribution.png")
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if __name__ == "__main__":
|
|
62
|
-
client = Vaapi(
|
|
63
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
64
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
65
|
-
)
|
|
66
|
-
logs = client.logs.list()
|
|
67
|
-
# candidates_top_distribution(logs)
|
|
68
|
-
# candidates_distribution(logs)
|
|
69
|
-
|
|
70
|
-
x_list_top = list()
|
|
71
|
-
y_list_top = list()
|
|
72
|
-
x_list_bottom = list()
|
|
73
|
-
y_list_bottom = list()
|
|
74
|
-
for data in logs:
|
|
75
|
-
print(data.log_path)
|
|
76
|
-
response = client.cognition_repr.list(
|
|
77
|
-
log_id=168,
|
|
78
|
-
representation_name="MultiBallPercept",
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
for multipercept in response:
|
|
82
|
-
if "percepts" in multipercept.representation_data:
|
|
83
|
-
for percept in multipercept.representation_data["percepts"]:
|
|
84
|
-
cx = percept["centerInImage"]["x"]
|
|
85
|
-
cy = percept["centerInImage"]["y"]
|
|
86
|
-
cam = percept["cameraId"]
|
|
87
|
-
if cam == "top":
|
|
88
|
-
x_list_top.append(cx)
|
|
89
|
-
y_list_top.append(cy)
|
|
90
|
-
else:
|
|
91
|
-
x_list_bottom.append(cx)
|
|
92
|
-
y_list_bottom.append(cy)
|
|
93
|
-
|
|
94
|
-
fig, ax = plt.subplots()
|
|
95
|
-
plt.title("Frequency of Ball Percepts found in Image Top")
|
|
96
|
-
h = ax.hist2d(
|
|
97
|
-
x_list_top, y_list_top, bins=[np.arange(0, 640, 20), np.arange(0, 480, 20)]
|
|
98
|
-
)
|
|
99
|
-
fig.colorbar(h[3], ax=ax)
|
|
100
|
-
plt.savefig("ball_percepts_top_distribution.png")
|
|
101
|
-
|
|
102
|
-
fig, ax = plt.subplots()
|
|
103
|
-
plt.title("Frequency of Ball Percepts found in Image")
|
|
104
|
-
h = ax.hist2d(
|
|
105
|
-
x_list_bottom,
|
|
106
|
-
y_list_bottom,
|
|
107
|
-
bins=[np.arange(0, 640, 20), np.arange(0, 480, 20)],
|
|
108
|
-
)
|
|
109
|
-
fig.colorbar(h[3], ax=ax)
|
|
110
|
-
plt.savefig("ball_percepts_distribution.png")
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
from vaapi.client import Vaapi
|
|
2
|
-
from vaapi.types.image import Image
|
|
3
|
-
import os
|
|
4
|
-
|
|
5
|
-
def get_and_update_img():
|
|
6
|
-
imgs = client.image.list(log=282)
|
|
7
|
-
imgs_to_update = []
|
|
8
|
-
for img in imgs:
|
|
9
|
-
#construct image with id and the fields that you want to update
|
|
10
|
-
imgs_to_update.append(Image(id=img.id,frame=img.frame.id))
|
|
11
|
-
if len(imgs_to_update) == 10:
|
|
12
|
-
break
|
|
13
|
-
print(imgs_to_update)
|
|
14
|
-
|
|
15
|
-
client.image.bulk_update(data=imgs_to_update)
|
|
16
|
-
|
|
17
|
-
if __name__ == "__main__":
|
|
18
|
-
client = Vaapi(
|
|
19
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
20
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
21
|
-
)
|
|
22
|
-
get_and_update_img()
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import requests
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
def upload_model(files):
|
|
5
|
-
response = requests.post(url=f"{base_url[0]}api/upload/model/",files=files,headers=headers)
|
|
6
|
-
print(response.text)
|
|
7
|
-
|
|
8
|
-
def upload_dataset(files):
|
|
9
|
-
response = requests.post(url=f"{base_url[0]}api/upload/dataset/",files=files,headers=headers)
|
|
10
|
-
print(response.text)
|
|
11
|
-
|
|
12
|
-
if __name__ == "__main__":
|
|
13
|
-
base_url=os.environ.get("VAT_API_URL"),
|
|
14
|
-
api_key=os.environ.get("VAT_API_TOKEN"),
|
|
15
|
-
|
|
16
|
-
# specify a file you want to upload
|
|
17
|
-
files = {'file': open('test-upload.h5', 'rb')}
|
|
18
|
-
headers ={"Authorization":f"Token {api_key[0]}"}
|
|
19
|
-
|
|
20
|
-
upload_model(files)
|
|
21
|
-
# upload_dataset(files)
|