Skip to content

Commit 770041a

Browse files
authored
Release v2.3.1
Release Notes New Features Support for Additional Video and Image Extensions: Expanded support to include more video and image file formats, enhancing the versatility and compatibility of our software. Updates Test Updates: Updated tests.png to reflect the latest changes and improvements in the testing suite. Integrations Codecov Integration: Integrated Codecov for code coverage analysis to ensure higher code quality and maintainability.
2 parents a9d334a + 59e0620 commit 770041a

File tree

8 files changed

+30
-22
lines changed

8 files changed

+30
-22
lines changed

.github/README.pl.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
<div id="badges">
55
<p align="center">
66
<img alt="Github Created At" src="https://img.shields.io/github/created-at/BKDDFS/PerfectFrameAI">
7-
<img alt="GitHub Downloads (all assets, all releases)" src="https://img.shields.io/github/downloads/BKDDFS/PerfectFrameAI/total?style=flat&color=blue">
7+
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/BKDDFS/PerfectFrameAI">
8+
<a href="https://codecov.io/github/BKDDFS/PerfectFrameAI" >
9+
<img src="https://codecov.io/github/BKDDFS/PerfectFrameAI/graph/badge.svg?token=GT9TGKBGYI"/>
10+
</a>
811
<img alt="GitHub License" src="https://img.shields.io/github/license/BKDDFS/PerfectFrameAI">
9-
<img alt="GitHub Release" src="https://img.shields.io/github/v/release/BKDDFS/PerfectFrameAI">
12+
<img alt="GitHub Tag" src="https://img.shields.io/github/v/tag/BKDDFS/PerfectFrameAI">
1013
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/BKDDFS/PerfectFrameAI">
1114
</p>
1215
</div>
@@ -47,7 +50,7 @@
4750
</summary>
4851
<img src="../static/start_frames.png" width="350">
4952
<ol>
50-
<p>Input: Folder z plikami video <code>.mp4</code>.</p>
53+
<p>Input: Folder z plikami video.</p>
5154
<li>Bierze pierwsze video ze wskazanej lokalizacji.</li>
5255
<li>
5356
Dzieli wideo na klatki.
@@ -69,7 +72,7 @@
6972
</summary>
7073
<img src="../static/start_images.png" width="350">
7174
<ol>
72-
<p>Input: Folder z obrazami <code>.jpg</code>.</p>
75+
<p>Input: Folder z obrazami.</p>
7376
<li>Wczytuje obrazy. Obrazy są przetwarzane batchach(seriach).</li>
7477
<li>Ocenia wszystkie obrazy w batchu za pomocą modelu AI i nadaje im ocenę liczbową.</li>
7578
<li>
@@ -89,7 +92,7 @@
8992
<p>Modyfikuje <code>best_frames_extractor</code> poprzez pominięcie części z AI/ocenianiem klatek.</p>
9093
<code>python start.py best_frames_extractor --all_frames</code>
9194
<ol>
92-
<p>Input: Folder z plikami video <code>.mp4</code>.</p>
95+
<p>Input: Folder z plikami video.</p>
9396
<li>Bierze pierwsze video ze wskazanej lokalizacji.</li>
9497
<li>
9598
Dzieli wideo na klatki. Klatki są brane co 1 sekundę wideo.
@@ -448,7 +451,7 @@
448451
</div>
449452
<div id="tests">
450453
<h2>🧪 Testy</h2>
451-
<img src="../static/tests_passed.png">
454+
<img src="../static/tests.png">
452455
<p>
453456
Testy możesz uruchomić instalując zależności z <code>pyproject.toml</code>
454457
i wpisując w terminal w lokalizacj projektu - <code>pytest</code>.
@@ -498,7 +501,6 @@
498501
Podsumowując, dodanie DALI powinno być kolejnym poważnym krokiem naprzód,
499502
jeśli chodzi o poprawę wydajności.
500503
</li>
501-
<li>Przetestowanie działania na starszych wersjach Pythona.</li>
502504
<li>
503505
Naprawienie spillingu danych podczas oceniania klatek.
504506
Obecnie ocenianie ma delikatne spowolnienie w postaci problemu ze spillingiem.

.github/workflows/run_tests.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# This workflow will install Poetry, install Python dependencies, run tests a single version of Python
2-
31
name: CI
42

53
on:
@@ -11,7 +9,6 @@ on:
119
permissions:
1210
contents: read
1311

14-
1512
jobs:
1613
build:
1714
runs-on: ubuntu-latest
@@ -46,8 +43,15 @@ jobs:
4643
run: |
4744
poetry install
4845
49-
- name: Run tests
46+
- name: Run tests with coverage
5047
env:
5148
DOCKER_HOST: tcp://localhost:2375
5249
run: |
53-
poetry run pytest
50+
poetry run pytest --cov --cov-report=xml
51+
52+
- name: Upload coverage to Codecov
53+
uses: codecov/codecov-action@v3.1.1
54+
with:
55+
token: ${{ secrets.CODECOV_TOKEN }}
56+
files: ./coverage.xml
57+
fail_ci_if_error: true

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<p align="center">
66
<img alt="Github Created At" src="https://img.shields.io/github/created-at/BKDDFS/PerfectFrameAI">
77
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/BKDDFS/PerfectFrameAI">
8+
<a href="https://codecov.io/github/BKDDFS/PerfectFrameAI" >
9+
<img src="https://codecov.io/github/BKDDFS/PerfectFrameAI/graph/badge.svg?token=GT9TGKBGYI"/>
10+
</a>
811
<img alt="GitHub License" src="https://img.shields.io/github/license/BKDDFS/PerfectFrameAI">
912
<img alt="GitHub Tag" src="https://img.shields.io/github/v/tag/BKDDFS/PerfectFrameAI">
1013
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/BKDDFS/PerfectFrameAI">
@@ -47,7 +50,7 @@
4750
</summary>
4851
<img src="static/start_frames.png" width="350">
4952
<ol>
50-
<p>Input: Folder with <code>.mp4</code> video files.</p>
53+
<p>Input: Folder with video files.</p>
5154
<li>Takes the first video from the specified location.</li>
5255
<li>
5356
Splits the video into frames.
@@ -69,7 +72,7 @@
6972
</summary>
7073
<img src="static/start_images.png" width="350">
7174
<ol>
72-
<p>Input: Folder with <code>.jpg</code> images.</p>
75+
<p>Input: Folder with images.</p>
7376
<li>Loads the images. Images are processed in batches.</li>
7477
<li>Evaluates all images in the batch using an AI model and assigns them a numerical score.</li>
7578
<li>
@@ -89,7 +92,7 @@
8992
<p>Modifying <code>best_frames_extractor</code> by skipping AI evaluation part.</p>
9093
<code>python start.py best_frames_extractor --all_frames</code>
9194
<ol>
92-
<p>Input: Folder with <code>.mp4</code> video files.</p>
95+
<p>Input: Folder with video files.</p>
9396
<li>Takes the first video from the specified location.</li>
9497
<li>
9598
Splits the video into frames.
@@ -440,7 +443,7 @@
440443
</div>
441444
<div id="tests">
442445
<h2>🧪 Tests</h2>
443-
<img src="static/tests_passed.png" width="1000" style="border-radius: 10px;">
446+
<img src="static/tests.png" width="1000" style="border-radius: 10px;">
444447
<p>
445448
You can run the tests by installing the dependencies from <code>pyproject.toml</code>
446449
and typing in the terminal in the project location - <code>pytest</code>.
@@ -490,7 +493,6 @@
490493
In summary, adding DALI should be another significant step forward
491494
in terms of performance improvement.
492495
</li>
493-
<li>Testing on older versions of Python.</li>
494496
<li>
495497
Fixing data spilling during frame evaluation.
496498
Currently, evaluation has a slight slowdown in the form of a spilling issue.

extractor_service/app/schemas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ class ExtractorConfig(BaseModel):
5454
"""
5555
input_directory: DirectoryPath = Path("/app/input_directory")
5656
output_directory: DirectoryPath = Path("/app/output_directory")
57-
video_extensions: tuple[str] = (".mp4",)
58-
images_extensions: tuple[str] = (".jpg",)
57+
video_extensions: tuple[str] = (".mp4", ".mov", ".webm", ".mkv", ".avi") # add more containers here
58+
images_extensions: tuple[str] = (".jpg", ".jpeg", ".png", ".webp") # add more containers here
5959
processed_video_prefix: str = "frames_extracted_"
6060
batch_size: int = 100
6161
compering_group_size: int = 5

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "PerfectFrameAI"
3-
version = "2.3.0"
3+
version = "2.3.1"
44
description = "AI tool for finding the most aesthetic frames in a video. 🎞️➜🖼️"
55
authors = ["Bartłomiej Flis <Bartekdawidflis@gmail.com>"]
66
license = "GPL-3.0 license"

static/tests.png

91.7 KB
Loading

static/tests_passed.png

-144 KB
Binary file not shown.

tests/extractor_service/unit/schemas_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def test_config_default():
1212
config = ExtractorConfig()
1313
assert config.input_directory == Path("/app/input_directory")
1414
assert config.output_directory == Path("/app/output_directory")
15-
assert config.video_extensions == (".mp4",)
16-
assert config.images_extensions == (".jpg",)
15+
assert config.video_extensions == (".mp4", ".mov", ".webm", ".mkv", ".avi")
16+
assert config.images_extensions == (".jpg", ".jpeg", ".png", ".webp")
1717
assert config.processed_video_prefix == "frames_extracted_"
1818
assert isinstance(config.compering_group_size, int)
1919
assert isinstance(config.batch_size, int)

0 commit comments

Comments
 (0)