Skip to content

Commit 0a67cbb

Browse files
authored
Merge pull request #6 from OpenSportsLab/smart-annotation
Smart annotation
2 parents 39fe0fc + b7d3631 commit 0a67cbb

49 files changed

Lines changed: 3313 additions & 241 deletions

Some content is hidden

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

.DS_Store

-12 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- dev-jintao
8+
- smart-annotation
89
workflow_dispatch:
910

1011
concurrency:
@@ -43,6 +44,7 @@ jobs:
4344
- name: Install requirements
4445
run: |
4546
python -m pip install --upgrade pip
47+
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
4648
pip install -r requirements.txt
4749
4850
- name: Cleanup before PyInstaller
@@ -56,26 +58,30 @@ jobs:
5658
shell: pwsh
5759
run: >
5860
python -m PyInstaller --noconfirm --clean --windowed --onefile
59-
--name "SoccerNetProAnalyzer"
61+
--name "VideoAnnotationTool"
6062
--add-data "style;style"
6163
--add-data "ui;ui"
6264
--add-data "controllers;controllers"
6365
--add-data "image;image"
66+
--add-data "config.yaml;."
67+
--collect-all "soccernetpro"
68+
--collect-all "wandb"
69+
--collect-all "torch_geometric"
6470
"main.py"
6571
6672
- name: Zip Windows binary (manual runs only)
6773
if: github.event_name == 'workflow_dispatch'
6874
shell: pwsh
6975
run: |
70-
Move-Item -Force dist\SoccerNetProAnalyzer.exe dist\SoccerNetProAnalyzer-win.exe
71-
Compress-Archive -Path dist\SoccerNetProAnalyzer-win.exe -DestinationPath dist\SoccerNetProAnalyzer-win.zip -Force
76+
Move-Item -Force dist\VideoAnnotationTool.exe dist\VideoAnnotationTool-win.exe
77+
Compress-Archive -Path dist\VideoAnnotationTool-win.exe -DestinationPath dist\VideoAnnotationTool-win.zip -Force
7278
7379
- name: Upload artifact (manual runs only)
7480
if: github.event_name == 'workflow_dispatch'
7581
uses: actions/upload-artifact@v4
7682
with:
77-
name: SoccerNetProAnalyzer-Windows
78-
path: annotation_tool/dist/SoccerNetProAnalyzer-win.zip
83+
name: VideoAnnotationTool-Windows
84+
path: annotation_tool/dist/VideoAnnotationTool-win.zip
7985
retention-days: 3
8086

8187
build-macos:
@@ -116,25 +122,29 @@ jobs:
116122
shell: bash
117123
run: >
118124
python -m PyInstaller --noconfirm --clean --windowed
119-
--name "SoccerNetProAnalyzer"
125+
--name "VideoAnnotationTool"
120126
--add-data "style:style"
121127
--add-data "ui:ui"
122128
--add-data "controllers:controllers"
123129
--add-data "image:image"
130+
--add-data "config.yaml:."
131+
--collect-all "soccernetpro"
132+
--collect-all "wandb"
133+
--collect-all "torch_geometric"
124134
"main.py"
125135
126136
- name: Zip macOS app (manual runs only)
127137
if: github.event_name == 'workflow_dispatch'
128138
shell: bash
129139
run: |
130-
ditto -c -k --sequesterRsrc --keepParent "dist/SoccerNetProAnalyzer.app" "dist/SoccerNetProAnalyzer-mac.zip"
140+
ditto -c -k --sequesterRsrc --keepParent "dist/VideoAnnotationTool.app" "dist/VideoAnnotationTool-mac.zip"
131141
132142
- name: Upload artifact (manual runs only)
133143
if: github.event_name == 'workflow_dispatch'
134144
uses: actions/upload-artifact@v4
135145
with:
136-
name: SoccerNetProAnalyzer-macOS
137-
path: annotation_tool/dist/SoccerNetProAnalyzer-mac.zip
146+
name: VideoAnnotationTool-macOS
147+
path: annotation_tool/dist/VideoAnnotationTool-mac.zip
138148
retention-days: 3
139149

140150
build-linux:
@@ -168,6 +178,7 @@ jobs:
168178
- name: Install requirements
169179
run: |
170180
python -m pip install --upgrade pip
181+
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
171182
pip install -r requirements.txt
172183
173184
- name: Cleanup before PyInstaller
@@ -180,26 +191,30 @@ jobs:
180191
shell: bash
181192
run: >
182193
python -m PyInstaller --noconfirm --clean --windowed --onefile
183-
--name "SoccerNetProAnalyzer"
194+
--name "VideoAnnotationTool"
184195
--add-data "style:style"
185196
--add-data "ui:ui"
186197
--add-data "controllers:controllers"
187198
--add-data "image:image"
199+
--add-data "config.yaml:."
200+
--collect-all "soccernetpro"
201+
--collect-all "wandb"
202+
--collect-all "torch_geometric"
188203
"main.py"
189204
190205
- name: Zip Linux binary (manual runs only)
191206
if: github.event_name == 'workflow_dispatch'
192207
shell: bash
193208
run: |
194-
mv -f dist/SoccerNetProAnalyzer dist/SoccerNetProAnalyzer-linux
209+
mv -f dist/VideoAnnotationTool dist/VideoAnnotationTool-linux
195210
cd dist
196-
zip -r SoccerNetProAnalyzer-linux.zip SoccerNetProAnalyzer-linux
211+
zip -r VideoAnnotationTool-linux.zip VideoAnnotationTool-linux
197212
cd ..
198213
199214
- name: Upload artifact (manual runs only)
200215
if: github.event_name == 'workflow_dispatch'
201216
uses: actions/upload-artifact@v4
202217
with:
203-
name: SoccerNetProAnalyzer-Linux
204-
path: annotation_tool/dist/SoccerNetProAnalyzer-linux.zip
218+
name: VideoAnnotationTool-Linux
219+
path: annotation_tool/dist/VideoAnnotationTool-linux.zip
205220
retention-days: 3

.github/workflows/deploy_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
- dev-jintao
7+
- smart-annotation
88
workflow_dispatch:
99

1010

.github/workflows/release.yml

Lines changed: 75 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ on:
99
permissions:
1010
contents: write
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
generate-release-notes:
18+
name: Generate release notes
1419
runs-on: ubuntu-latest
1520
outputs:
1621
changelog: ${{ steps.notes.outputs.changelog }}
@@ -31,17 +36,19 @@ jobs:
3136
} >> "$GITHUB_OUTPUT"
3237
3338
create-release:
39+
name: Create GitHub Release
3440
needs: generate-release-notes
3541
runs-on: ubuntu-latest
3642
steps:
37-
- name: Create/Update GitHub Release (body only)
43+
- name: Create/Update GitHub Release
3844
uses: softprops/action-gh-release@v2
3945
with:
4046
tag_name: ${{ github.ref_name }}
4147
name: ${{ github.ref_name }}
4248
body: ${{ needs.generate-release-notes.outputs.changelog }}
4349
4450
build-windows:
51+
name: Build on Windows
4552
needs: create-release
4653
runs-on: windows-latest
4754
defaults:
@@ -54,9 +61,22 @@ jobs:
5461
with:
5562
python-version: "3.11"
5663
64+
- name: Cache pip
65+
uses: actions/cache@v4
66+
with:
67+
path: |
68+
~\AppData\Local\pip\Cache
69+
~\AppData\Local\pip\cache
70+
~\AppData\Roaming\pip\Cache
71+
key: ${{ runner.os }}-pip-${{ hashFiles('annotation_tool/requirements.txt') }}
72+
restore-keys: |
73+
${{ runner.os }}-pip-
74+
5775
- name: Install requirements
76+
shell: pwsh
5877
run: |
5978
python -m pip install --upgrade pip
79+
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
6080
pip install -r requirements.txt
6181
6282
- name: Cleanup before PyInstaller
@@ -68,32 +88,37 @@ jobs:
6888
6989
- name: Build exe
7090
shell: pwsh
71-
run: |
72-
python -m PyInstaller --noconfirm --clean --windowed --onefile `
73-
--name "SoccerNetProAnalyzer" `
74-
--add-data "style;style" `
75-
--add-data "ui;ui" `
76-
--add-data "controllers;controllers" `
77-
--add-data "image;image" `
78-
"main.py"
91+
run: >
92+
python -m PyInstaller --noconfirm --clean --windowed --onefile
93+
--name "VideoAnnotationTool"
94+
--add-data "style;style"
95+
--add-data "ui;ui"
96+
--add-data "controllers;controllers"
97+
--add-data "image;image"
98+
--add-data "config.yaml;."
99+
--collect-all "soccernetpro"
100+
--collect-all "wandb"
101+
--collect-all "torch_geometric"
102+
"main.py"
79103
80104
- name: Rename binary
81105
shell: pwsh
82106
run: |
83-
Move-Item -Force dist\SoccerNetProAnalyzer.exe dist\SoccerNetProAnalyzer-win.exe
107+
Move-Item -Force dist\VideoAnnotationTool.exe dist\VideoAnnotationTool-win.exe
84108
85109
- name: Zip Windows binary
86110
shell: pwsh
87111
run: |
88-
Compress-Archive -Path dist\SoccerNetProAnalyzer-win.exe -DestinationPath dist\SoccerNetProAnalyzer-win.zip -Force
112+
Compress-Archive -Path dist\VideoAnnotationTool-win.exe -DestinationPath dist\VideoAnnotationTool-win.zip -Force
89113
90114
- name: Upload Release Asset (Windows)
91115
uses: softprops/action-gh-release@v2
92116
with:
93-
files: annotation_tool/dist/SoccerNetProAnalyzer-win.zip
94117
tag_name: ${{ github.ref_name }}
118+
files: annotation_tool/dist/VideoAnnotationTool-win.zip
95119
96120
build-macos:
121+
name: Build on macOS
97122
needs: create-release
98123
runs-on: macos-latest
99124
defaults:
@@ -106,7 +131,18 @@ jobs:
106131
with:
107132
python-version: "3.11"
108133
134+
- name: Cache pip
135+
uses: actions/cache@v4
136+
with:
137+
path: |
138+
~/Library/Caches/pip
139+
~/.cache/pip
140+
key: ${{ runner.os }}-pip-${{ hashFiles('annotation_tool/requirements.txt') }}
141+
restore-keys: |
142+
${{ runner.os }}-pip-
143+
109144
- name: Install requirements
145+
shell: bash
110146
run: |
111147
python -m pip install --upgrade pip
112148
pip install -r requirements.txt
@@ -121,25 +157,30 @@ jobs:
121157
shell: bash
122158
run: >
123159
python -m PyInstaller --noconfirm --clean --windowed
124-
--name "SoccerNetProAnalyzer"
160+
--name "VideoAnnotationTool"
125161
--add-data "style:style"
126162
--add-data "ui:ui"
127163
--add-data "controllers:controllers"
128164
--add-data "image:image"
165+
--add-data "config.yaml:."
166+
--collect-all "soccernetpro"
167+
--collect-all "wandb"
168+
--collect-all "torch_geometric"
129169
"main.py"
130170
131171
- name: Zip macOS app
132172
shell: bash
133173
run: |
134-
ditto -c -k --sequesterRsrc --keepParent "dist/SoccerNetProAnalyzer.app" "dist/SoccerNetProAnalyzer-mac.zip"
174+
ditto -c -k --sequesterRsrc --keepParent "dist/VideoAnnotationTool.app" "dist/VideoAnnotationTool-mac.zip"
135175
136176
- name: Upload Release Asset (macOS)
137177
uses: softprops/action-gh-release@v2
138178
with:
139-
files: annotation_tool/dist/SoccerNetProAnalyzer-mac.zip
140179
tag_name: ${{ github.ref_name }}
180+
files: annotation_tool/dist/VideoAnnotationTool-mac.zip
141181
142182
build-linux:
183+
name: Build on Linux
143184
needs: create-release
144185
runs-on: ubuntu-latest
145186
defaults:
@@ -158,9 +199,20 @@ jobs:
158199
sudo apt-get update
159200
sudo apt-get install -y libgl1 libglib2.0-0 libxcb-cursor0
160201
202+
- name: Cache pip
203+
uses: actions/cache@v4
204+
with:
205+
path: |
206+
~/.cache/pip
207+
key: ${{ runner.os }}-pip-${{ hashFiles('annotation_tool/requirements.txt') }}
208+
restore-keys: |
209+
${{ runner.os }}-pip-
210+
161211
- name: Install requirements
212+
shell: bash
162213
run: |
163214
python -m pip install --upgrade pip
215+
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
164216
pip install -r requirements.txt
165217
166218
- name: Cleanup before PyInstaller
@@ -173,27 +225,31 @@ jobs:
173225
shell: bash
174226
run: >
175227
python -m PyInstaller --noconfirm --clean --windowed --onefile
176-
--name "SoccerNetProAnalyzer"
228+
--name "VideoAnnotationTool"
177229
--add-data "style:style"
178230
--add-data "ui:ui"
179231
--add-data "controllers:controllers"
180232
--add-data "image:image"
233+
--add-data "config.yaml:."
234+
--collect-all "soccernetpro"
235+
--collect-all "wandb"
236+
--collect-all "torch_geometric"
181237
"main.py"
182238
183239
- name: Rename binary
184240
shell: bash
185241
run: |
186-
mv -f dist/SoccerNetProAnalyzer dist/SoccerNetProAnalyzer-linux
242+
mv -f dist/VideoAnnotationTool dist/VideoAnnotationTool-linux
187243
188244
- name: Zip Linux binary
189245
shell: bash
190246
run: |
191247
cd dist
192-
zip -r SoccerNetProAnalyzer-linux.zip SoccerNetProAnalyzer-linux
248+
zip -r VideoAnnotationTool-linux.zip VideoAnnotationTool-linux
193249
cd ..
194250
195251
- name: Upload Release Asset (Linux)
196252
uses: softprops/action-gh-release@v2
197253
with:
198-
files: annotation_tool/dist/SoccerNetProAnalyzer-linux.zip
199254
tag_name: ${{ github.ref_name }}
255+
files: annotation_tool/dist/VideoAnnotationTool-linux.zip

0 commit comments

Comments
 (0)