Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ build:
.PHONY: vs
vs:
rm -f encoded.mkv
vspipe -c y4m example/vapoursynth.py - | ffmpeg -i - -vcodec libx265 -crf 16 encoded.mkv
vspipe -c y4m example/sr_vs.py - | ffmpeg -i - -vcodec libx264 encoded.mp4

.PHONY: dev
dev:
docker compose -f cccv-docker-compose.yml down
docker compose -f cccv-docker-compose.yml up -d
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ import numpy as np

from cccv import AutoModel, ConfigType, SRBaseModel

model: SRBaseModel = AutoModel.from_pretrained(
pretrained_model_name=ConfigType.RealESRGAN_AnimeJaNai_HD_V3_Compact_2x,
)
model: SRBaseModel = AutoModel.from_pretrained(ConfigType.RealESRGAN_AnimeJaNai_HD_V3_Compact_2x)

img = cv2.imdecode(np.fromfile("test.jpg", dtype=np.uint8), cv2.IMREAD_COLOR)
img = model.inference_image(img)
Expand All @@ -47,10 +45,10 @@ a simple example to use the VapourSynth to process a video
import vapoursynth as vs
from vapoursynth import core

from cccv import AutoModel, VSRBaseModel, ConfigType
from cccv import AutoModel, ConfigType, SRBaseModel

model: VSRBaseModel = AutoModel.from_pretrained(
pretrained_model_name=ConfigType.RealESRGAN_AnimeJaNai_HD_V3_Compact_2x,
model: SRBaseModel = AutoModel.from_pretrained(
ConfigType.RealESRGAN_AnimeJaNai_HD_V3_Compact_2x,
tile=None
)

Expand All @@ -61,7 +59,13 @@ clip = core.resize.Bicubic(clip=clip, matrix_s="709", format=vs.YUV420P16)
clip.set_output()
```

See more examples in the [example](./example) directory, cccv can register custom configurations and models to extend the functionality
See more examples in the [example](./example) directory, including:

- SISR (Single Image Super-Resolution)
- VSR (Video Super-Resolution)
- VFI (Video Frame Interpolation)

cccv can register custom configurations and models to extend the functionality

### Current Support

Expand Down
Binary file added assets/vfi/test_i0.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/vfi/test_i1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/vfi/test_i2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/vfi/test_out_drba_0.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/vfi/test_out_drba_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/vfi/test_out_drba_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/vfi/test_out_drba_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/vfi/test_out_drba_4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/vfi/test_out_rife.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions cccv-docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: "3.8"

name: cccv

networks:
backend:
driver: bridge

services:
playground-cuda:
image: lychee0/vs-playground:cuda-dev
restart: always
ports:
- "1145:8888"
- "1022:22"
volumes:
- ./:/cccv
environment:
- JUPYTER_TOKEN=114514
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids:
- "0"
capabilities:
- gpu
- utility
- compute
- video
networks:
- backend
4 changes: 2 additions & 2 deletions cccv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@

from cccv.arch import ARCH_REGISTRY
from cccv.auto import AutoConfig, AutoModel
from cccv.config import CONFIG_REGISTRY, BaseConfig, SRBaseConfig, VSRBaseConfig
from cccv.model import MODEL_REGISTRY, AuxiliaryBaseModel, CCBaseModel, SRBaseModel, VSRBaseModel
from cccv.config import CONFIG_REGISTRY, BaseConfig, SRBaseConfig, VFIBaseConfig, VSRBaseConfig
from cccv.model import MODEL_REGISTRY, AuxiliaryBaseModel, CCBaseModel, SRBaseModel, VFIBaseModel, VSRBaseModel
from cccv.type import ArchType, BaseModelInterface, ConfigType, ModelType
4 changes: 4 additions & 0 deletions cccv/arch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@

from cccv.arch.vsr.edvr_arch import EDVR
from cccv.arch.vsr.msrswvsr_arch import MSRSWVSR

# Video Frame Interpolation
from cccv.arch.vfi.ifnet_arch import IFNet
from cccv.arch.vfi.drba_arch import DRBA
Empty file added cccv/arch/vfi/__init__.py
Empty file.
Loading
Loading