Skip to content

svt_av1_lanczos submission (score: 2.20)#17

Closed
EthanYangTW wants to merge 2 commits intocommaai:masterfrom
EthanYangTW:winner-submission
Closed

svt_av1_lanczos submission (score: 2.20)#17
EthanYangTW wants to merge 2 commits intocommaai:masterfrom
EthanYangTW:winner-submission

Conversation

@EthanYangTW
Copy link
Copy Markdown
Contributor

@EthanYangTW EthanYangTW commented Apr 3, 2026

submission name:

svt_av1_lanczos

upload zipped archive.zip

https://github.com/EthanYangTW/comma_video_compression_challenge/releases/download/v0.2/archive_220.zip

report.txt

=== Evaluation results over 600 samples ===
  Average PoseNet Distortion: 0.08446115
  Average SegNet Distortion: 0.00708126
  Submission file size: 860,695 bytes
  Original uncompressed size: 37,545,489 bytes
  Compression Rate: 0.02292406
  Final score: 100*segnet_dist + √(10*posenet_dist) + 25*rate = 2.20

does your submission require gpu for evaluation (inflation)?

no

did you include the compression script? and want it to be merged?

yes

additional comments

SVT-AV1 with 45% lanczos downscale, CRF 33, preset 0, GOP 180, film-grain=22 (denoise+synth).
Film grain synthesis strips sensor noise before encoding for better compression, decoder re-adds synthetic grain.

Copilot AI review requested due to automatic review settings April 3, 2026 13:10
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Thanks for the submission @EthanYangTW! 🤏

A maintainer will review your PR shortly.

To run the evaluation, a maintainer will trigger the eval workflow with your PR number.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the “winner” submission implementation to the repository, providing an inflation pipeline (decode + resize back to original resolution) and an optional compression script matching the reported leaderboard score.

Changes:

  • Added inflate.sh + inflate.py to decode the submission’s .mkv files and upscale frames back to camera_size, writing .raw RGB dumps.
  • Added compress.sh that builds archive.zip by encoding videos with SVT-AV1 after Lanczos downscaling.
  • Added the submission package initializer (__init__.py) for module execution via python -m submissions.winner.inflate.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
submissions/winner/inflate.sh Runs the submission’s Python inflator per file listed by the evaluator.
submissions/winner/inflate.py Decodes video frames with PyAV and resizes to camera_size before writing raw RGB bytes.
submissions/winner/compress.sh Optional script to generate archive.zip using ffmpeg + SVT-AV1 with downscaling.
submissions/winner/init.py Makes submissions.winner a Python package for -m execution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +10 to +29

rm -rf "$ARCHIVE_DIR"
mkdir -p "$ARCHIVE_DIR"

while IFS= read -r rel; do
[[ -z "$rel" ]] && continue
IN="${IN_DIR}/${rel}"
BASE="${rel%.*}"
OUT="${ARCHIVE_DIR}/${BASE}.mkv"

echo "→ ${IN} → ${OUT}"

ffmpeg -nostdin -y -hide_banner -loglevel warning \
-r 20 -fflags +genpts -i "$IN" \
-vf "scale=trunc(iw*0.45/2)*2:trunc(ih*0.45/2)*2:flags=lanczos" \
-c:v libsvtav1 -preset 0 -crf 32 \
-g 180 \
-r 20 "$OUT"
done < "$VIDEO_NAMES_FILE"

Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compress.sh hard-codes the input videos directory and video list file, and doesn’t accept the --in-dir / --video-names-file (and optionally --jobs) CLI flags that other submissions’ compress.sh scripts support (e.g. submissions/baseline_fast/compress.sh). This makes the compression script harder to reuse with other datasets like test_videos.zip and inconsistent with the existing submission script interface.

Consider adding the same argument parsing/usage pattern as baseline_fast so callers can override input dir, names file, and parallelism without editing the script.

Suggested change
rm -rf "$ARCHIVE_DIR"
mkdir -p "$ARCHIVE_DIR"
while IFS= read -r rel; do
[[ -z "$rel" ]] && continue
IN="${IN_DIR}/${rel}"
BASE="${rel%.*}"
OUT="${ARCHIVE_DIR}/${BASE}.mkv"
echo "${IN}${OUT}"
ffmpeg -nostdin -y -hide_banner -loglevel warning \
-r 20 -fflags +genpts -i "$IN" \
-vf "scale=trunc(iw*0.45/2)*2:trunc(ih*0.45/2)*2:flags=lanczos" \
-c:v libsvtav1 -preset 0 -crf 32 \
-g 180 \
-r 20 "$OUT"
done < "$VIDEO_NAMES_FILE"
JOBS=1
usage() {
cat <<EOF
Usage: $(basename "$0") [--in-dir DIR] [--video-names-file FILE] [--jobs N]
Options:
--in-dir DIR Input videos directory (default: ${PD}/videos)
--video-names-file FILE File containing relative video paths (default: ${PD}/public_test_video_names.txt)
--jobs N Number of parallel ffmpeg jobs to run (default: 1)
-h, --help Show this help message
EOF
}
while [[ $# -gt 0 ]]; do
case "$1" in
--in-dir)
[[ $# -ge 2 ]] || { echo "Missing value for $1" >&2; usage; exit 1; }
IN_DIR="$2"
shift 2
;;
--video-names-file)
[[ $# -ge 2 ]] || { echo "Missing value for $1" >&2; usage; exit 1; }
VIDEO_NAMES_FILE="$2"
shift 2
;;
--jobs)
[[ $# -ge 2 ]] || { echo "Missing value for $1" >&2; usage; exit 1; }
JOBS="$2"
shift 2
;;
-h|--help)
usage
exit 0
;;
*)
echo "Unknown argument: $1" >&2
usage
exit 1
;;
esac
done
[[ "$JOBS" =~ ^[1-9][0-9]*$ ]] || { echo "--jobs must be a positive integer" >&2; exit 1; }
rm -rf "$ARCHIVE_DIR"
mkdir -p "$ARCHIVE_DIR"
compress_one() {
local rel="$1"
[[ -z "$rel" ]] && return 0
local in="${IN_DIR}/${rel}"
local base="${rel%.*}"
local out="${ARCHIVE_DIR}/${base}.mkv"
mkdir -p "$(dirname "$out")"
echo "${in}${out}"
ffmpeg -nostdin -y -hide_banner -loglevel warning \
-r 20 -fflags +genpts -i "$in" \
-vf "scale=trunc(iw*0.45/2)*2:trunc(ih*0.45/2)*2:flags=lanczos" \
-c:v libsvtav1 -preset 0 -crf 32 \
-g 180 \
-r 20 "$out"
}
export IN_DIR ARCHIVE_DIR
export -f compress_one
if [[ "$JOBS" -eq 1 ]]; then
while IFS= read -r rel; do
compress_one "$rel"
done < "$VIDEO_NAMES_FILE"
else
xargs -d '\n' -P "$JOBS" -I {} bash -lc 'compress_one "$1"' _ "{}" < "$VIDEO_NAMES_FILE"
fi

Copilot uses AI. Check for mistakes.
@EthanYangTW EthanYangTW changed the title winner submission (score: 2.90) yang submission (score: 2.90) Apr 3, 2026
@ylevental
Copy link
Copy Markdown

Great job! I think anyone who wants to beat your score will have to put in substantial effort for a slight improvement.

@YassineYousfi
Copy link
Copy Markdown
Collaborator

@EthanYangTW can you please rename to an informative name like svt_av1_lanczos ?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Eval Results: winner

=== Evaluation config ===
  batch_size: 16
  device: cpu
  num_threads: 2
  prefetch_queue_depth: 4
  report: submissions/winner/report.txt
  seed: 1234
  submission_dir: submissions/winner
  uncompressed_dir: /home/runner/work/comma_video_compression_challenge/comma_video_compression_challenge/videos
  video_names_file: /home/runner/work/comma_video_compression_challenge/comma_video_compression_challenge/public_test_video_names.txt
=== Evaluation results over 600 samples ===
  Average PoseNet Distortion: 0.33201236
  Average SegNet Distortion: 0.00522368
  Submission file size: 835,231 bytes
  Original uncompressed size: 37,545,489 bytes
  Compression Rate: 0.02224584
  Final score: 100*segnet_dist + √(10*posenet_dist) + 25*rate = 2.90

@EthanYangTW EthanYangTW changed the title yang submission (score: 2.90) svt_av1_lanczos submission (score: 2.20) Apr 3, 2026
@EthanYangTW EthanYangTW closed this Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants