Skip to content

Commit 547d797

Browse files
committed
does not store all frames in memory if they are not saved or used for ordering
1 parent 9460cdd commit 547d797

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ permissions:
1818
jobs:
1919
build:
2020
runs-on: ${{ matrix.os }}
21+
timeout-minutes: 60
2122

2223
strategy:
2324
fail-fast: false
@@ -54,6 +55,7 @@ jobs:
5455
run: |
5556
conda install -n sports2d -c conda-forge -c defaults pip
5657
conda install -n sports2d opensim-org::opensim -y
58+
timeout-minutes: 15
5759

5860
- name: Cache pip dependencies
5961
uses: actions/cache@v4
@@ -68,13 +70,15 @@ jobs:
6870
conda run -n sports2d python -m pip install flake8 pytest
6971
conda run -n sports2d python -m pip install git+https://github.com/${{ github.repository }}.git@${{ github.sha }}
7072
# conda run -n sports2d python -m pip install torch torchvision
73+
timeout-minutes: 10
7174

7275
- name: Lint with flake8
7376
run: |
7477
# stop the build if there are Python syntax errors or undefined names
7578
conda run -n sports2d flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
7679
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
7780
conda run -n sports2d flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
81+
timeout-minutes: 5
7882

7983
- name: Test with pytest
8084
env:
@@ -84,3 +88,4 @@ jobs:
8488
run: |
8589
cd Sports2D/Utilities
8690
conda run -n sports2d pytest -v tests.py --capture=sys
91+
timeout-minutes: 20

Sports2D/process.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,8 +1532,9 @@ def process_fun(config_dict, video_file, time_range, frame_rate, result_dir):
15321532
if save_angles:
15331533
all_frames_angles.append([])
15341534
continue
1535-
else:
1536-
frames.append(frame.copy())
1535+
else: # does not save frame if they are not saved or used for ordering UI
1536+
if save_img or save_vid or person_ordering_method == 'on_click':
1537+
frames.append(frame.copy())
15371538

15381539
# Retrieve pose or Estimate pose and track people
15391540
if load_trc_px:

0 commit comments

Comments
 (0)