Skip to content

Commit d6191e6

Browse files
authored
Merge pull request #7 from centralelyon/switch-to-imgCtrlPts
Switch to img ctrl pts and switch to vizapi features
2 parents f8c9a60 + db8ccf0 commit d6191e6

54 files changed

Lines changed: 5450 additions & 832 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.

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy to GitHub Pages
2+
on:
3+
push:
4+
branches: [main]
5+
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
11+
concurrency:
12+
group: pages
13+
cancel-in-progress: true
14+
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Inject API URL
24+
env:
25+
API_BASE: ${{ secrets.API_BASE }}
26+
run: |
27+
sed -i "s|http://localhost:8000/aquanote|$API_BASE|g" assets/js/aquanote-providers.js
28+
- name: Upload artifact
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: .
32+
- name: Deploy to GitHub Pages
33+
id: deployment
34+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,8 @@ dist/
8888

8989
# Ignorer les dépendances
9090
node_modules/
91-
.env
91+
.env
92+
package-lock.json
93+
94+
.venv/
95+
venv/

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ To use the site locally, you need to pull the branch and go offline with competi
5959

6060
### Structure of annotated data
6161

62-
Aquanote uses a specific data structure to store the annotations. It is based on a CSV file for each video, with samples provided in the [`course_demo`](courses_demo/2025_courses_demo/2025_courses_demo_translation_carre_100_demifinale) folder. Here is a sample of such a CSV file:
62+
Aquanote uses a specific data structure to store the annotations. It is based on a CSV file for each video, with samples provided in the [`videos`](videos/2025_courses_demo/2025_courses_demo_translation_carre_100_demifinale) folder. Here is a sample of such a CSV file:
6363

6464
```
6565
frameId,swimmerId,swimmerName,lane,cumul,eventId,eventX,eventY,event,TempsVideo (s),Temps (s),distance (m),tempo (s),frequence (cylce/min),amplitude (m),vitesse (m/s)
@@ -75,17 +75,17 @@ To analyse the CSV file, a dedicated repository is available:
7575

7676
### Adding new videos
7777

78-
The videos provided is in the `courses_demo` folder are samples. To add your own videos, you need to follow the same structure as in the demo folder.
78+
The videos provided is in the `videos` folder are samples. To add your own videos, you need to follow the same structure as in the demo folder.
7979

8080
Each competition should have its own subfolder, and then videos to used should be specified in a `metadata JSON` file located at the root of each competition folder. For example, for the demo competition the metadata file is `2025_courses_demo_translation_carre_50_finale`,
8181

82-
**[flatdir](https://github.com/centralelyon/flatdir)** is a Python module to flatten a directory structure and automatically generate the required JSON files at the root of each competition folder (like the [`courses_demo/flat.json`](courses_demo/flat.json) JSON, add `> flat.json` to save the output in such a file):
82+
**[flatdir](https://github.com/centralelyon/flatdir)** is a Python module to flatten a directory structure and automatically generate the required JSON files at the root of each competition folder (like the [`videos/flat.json`](videos/flat.json) JSON, add `> flat.json` to save the output in such a file):
8383

84-
> python -m flatdir courses_demo --limit 10 --nested --only type=directory --add espadon=false --add espadonModifie=false --add data_checked=false --no-defaults --min-depth 1 --add-depth 2 --ignore-typical > courses_demo/flat.json
84+
> python -m flatdir videos --limit 10 --nested --only type=directory --add espadon=false --add espadonModifie=false --add data_checked=false --no-defaults --min-depth 1 --add-depth 2 --ignore-typical > videos/flat.json
8585
8686
### Pre-processing videos
8787

88-
A `metadata JSON` contains information about pre-processing steps for each race to analyzed and should be created before the annotation phase. This includes temporal calibration (start and end times), spatial calibration (real-world dimensions) and athletes information (names, lanes). An example of such a JSON file is available in the demo folder: [`courses_demo/2025_courses_demo_translation_carre_50_finale/metadata.json`.](courses_demo/2025_courses_demo_translation_carre_50_finale/metadata.json).
88+
A `metadata JSON` contains information about pre-processing steps for each race to analyzed and should be created before the annotation phase. This includes temporal calibration (start and end times), spatial calibration (real-world dimensions) and athletes information (names, lanes). An example of such a JSON file is available in the demo folder: [`videos/2025_courses_demo/2025_courses_demo_translation_carre_50_finale/2025_courses_demo_translation_carre_50_finale.json`.](videos/2025_courses_demo/2025_courses_demo_translation_carre_50_finale/2025_courses_demo_translation_carre_50_finale.json).
8989

9090
While some pre-processingt steps can be done directly in Aquanote, some require external video and image processing tools. We suggest two tools to achieve this:
9191

@@ -108,7 +108,7 @@ To use another metadata file or output path:
108108

109109
```sh
110110
python scripts/generate_video.py \
111-
--metadata courses_demo/2025_courses_demo/2025_courses_demo_translation_carre_100_demifinale/2025_courses_demo_translation_carre_100_demifinale.json \
111+
--metadata videos/2025_courses_demo/2025_courses_demo_translation_carre_100_demifinale/2025_courses_demo_translation_carre_100_demifinale.json \
112112
--output demo_homography.mp4
113113
```
114114

assets/css/custom.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ padding: 20px;
853853
box-shadow: 0px 8px 16px rgba(0,0,0,0.1); /* Subtle shadow */
854854
border-radius: 5px; /* Rounded corners */
855855
overflow: hidden; /* Clip rounded corners */
856-
z-index: 1;
856+
z-index: 1000; /* Ensure it appears above other elements */
857857
}
858858
.dropdown-content button {
859859
color: #333; /* Dark gray text */
@@ -868,6 +868,10 @@ padding: 20px;
868868
text-align: center;
869869
}
870870

871+
.source-menu {
872+
z-index: 1001; /* Ensure it appears above other elements */
873+
}
874+
871875
.dropdown:hover .dropdown-content {
872876
display: block;
873877
}
@@ -977,7 +981,7 @@ padding: 20px;
977981
box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
978982
border-radius: 5px;
979983
overflow: hidden;
980-
z-index: 1;
984+
z-index: 1000;
981985
}
982986

983987
.dropdown-content button {

0 commit comments

Comments
 (0)