Skip to content

Commit

Permalink
Update .gitignore and add test for video upscaling
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Kreitzer committed Jan 16, 2024
1 parent 3def83e commit c30cbe0
Show file tree
Hide file tree
Showing 6 changed files with 190 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Project Specific Ignores
/weights
*.mp4
/test/data/*.avi

.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Video Upscaler

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


## Description
Quick project I hope to work on to help me upscale old home video footage from camcorders, etc.


## Features
- Upscales video using [Real-ESRGAN](https://github.com/sberbank-ai/Real-ESRGAN). Currently tested on Apple Silicon GPU (working, sort of)

## Installation

To install this project using Poetry, follow these steps:

1. Make sure you have Poetry installed. If not, you can install it by following the instructions [here](https://python-poetry.org/docs/#installation).
2. Clone the repository: `git clone https://github.com/nostoslabs/video_upscaler.git`
3. Navigate to the project directory: `cd video_upscaler`
4. Install the project dependencies: `poetry install`
5. Activate the virtual environment: `poetry shell`

You have now successfully installed the project using Poetry.



## Usage
```bash
poetry run upscale video.mp4 video_HD.mp4
```

## Contributing

Contributions are welcome! Follow these steps to contribute to the project:

1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Make your changes and commit them.
4. Push your changes to your forked repository.
5. Open a pull request to the main repository.

Please ensure that your code follows the project's coding conventions and style guidelines.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contact
Contact me via an issue.

## Acknowledgements
This is just a wrapper of the excellent pyAV and https://github.com/sberbank-ai/Real-ESRGAN models.
124 changes: 123 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ torchaudio = "^2.1.2"
[tool.poetry.scripts]
upscale = "video_upscaler.main:main"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.4"
flake8 = "^7.0.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Binary file added tests/data/heidi.mp4
Binary file not shown.
10 changes: 10 additions & 0 deletions tests/test_video_upscale.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest
from pathlib import Path
from video_upscaler.main import upscale_video

def test_upscale():
input_video = 'tests/data/heidi.mp4'
expected_output = 'tests/data/heidi_HD.mp4'
upscale_video(input_video, expected_output)
assert Path(expected_output).exists()

0 comments on commit c30cbe0

Please sign in to comment.