diff --git a/.github/examples/face.jpg b/.github/examples/face.jpg new file mode 100644 index 0000000..bdaa5e4 Binary files /dev/null and b/.github/examples/face.jpg differ diff --git a/.github/examples/snapshot.mp4 b/.github/examples/snapshot.mp4 new file mode 100644 index 0000000..d2557ac Binary files /dev/null and b/.github/examples/snapshot.mp4 differ diff --git a/.github/examples/target.mp4 b/.github/examples/target.mp4 new file mode 100644 index 0000000..a8f3f6f Binary files /dev/null and b/.github/examples/target.mp4 differ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49ca83c..ce8d223 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,3 +14,20 @@ jobs: python-version: 3.9 - run: pip install flake8 - run: flake8 run.py core + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up ffmpeg + uses: FedericoCarboni/setup-ffmpeg@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - run: pip install -r requirements.txt + - run: pip install gdown + - run: gdown 14JzEMo8ScLinvBkl7QEvYvFEi7EBXNAt + - run: ./run.py -f=.github/examples/face.jpg -t=.github/examples/target.mp4 -o=.github/examples/output.mp4 + - run: ffmpeg -i .github/examples/snapshot.mp4 -i .github/examples/output.mp4 -filter_complex "psnr" -f null - + diff --git a/requirements.txt b/requirements.txt index 70b082f..eaccae0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,8 +6,10 @@ psutil==5.9.5 tk==0.1.0 pillow==9.5.0 torch==2.0.1 -onnxruntime-gpu==1.15.0 -tensorflow==2.12.0 +onnxruntime==1.15.0; sys_platform == 'darwin' +onnxruntime-gpu==1.15.0; sys_platform != 'darwin' +tensorflow==2.13.0rc1; sys_platform == 'darwin' +tensorflow==2.12.0; sys_platform != 'darwin' opennsfw2==0.10.2 protobuf==4.23.2 tqdm==4.65.0