Skip to content

Commit 0e7fb8a

Browse files
authored
Revise README.md
1 parent dd6712b commit 0e7fb8a

File tree

1 file changed

+35
-24
lines changed

1 file changed

+35
-24
lines changed

README.md

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CoDeF: Content Deformation Fields for Temporally Consistent Video Processing
1+
# CoDeF: Content Deformation Fields for Temporally Consistent Video Processing
22

33
<img src='docs/teaser.gif'></img>
44

@@ -10,38 +10,43 @@
1010
<!-- Abstract: *This work presents the content deformation field **CoDeF** as a new type of video representation, which consists of a canonical content field aggregating the static contents in the entire video and a temporal deformation field recording the transformations from the canonical image (i.e., rendered from the canonical content field) to each individual frame along the time axis. Given a target video, these two fields are jointly optimized to reconstruct it through a carefully tailored rendering pipeline. We also introduce some decent regularizations into the optimization process, urging the canonical content field to inherit semantics (e.g., the object shape) from the video. With such a design, **CoDeF** naturally supports lifting image algorithms to videos, in the sense that one can apply an image algorithm to the canonical image and effortlessly propagate the outcomes to the entire video with the aid of the temporal deformation field. We experimentally show that **CoDeF** is able to lift image-to-image translation to video-to-video translation and lift keypoint detection to keypoint tracking without any training. More importantly, thanks to our lifting strategy that deploys the algorithms on only one image, we achieve superior cross-frame consistency in translated videos compared to existing video-to-video translation approaches, and even manage to track non-rigid objects like water and smog.* -->
1111

1212
## Requirements
13+
1314
The codebase is tested on
15+
1416
* Ubuntu 20.04
1517
* Python 3.10
1618
* [PyTorch](https://pytorch.org/) 2.0.0
1719
* [PyTorch Lightning](https://www.pytorchlightning.ai/index.html) 2.0.2
18-
* 1 Nvidia GPU (RTX A6000 48GB) with CUDA version 11.7
19-
(Other GPUs are also suitable, and 10GB of GPU memory is sufficient to run our code.)
20+
* 1 NVIDIA GPU (RTX A6000) with CUDA version 11.7. (Other GPUs are also suitable, and 10GB GPU memory is sufficient to run our code.)
2021

21-
To use video visualizer, please install `ffmpeg` by:
22+
To use video visualizer, please install `ffmpeg` via
2223

23-
```
24+
```shell
2425
sudo apt-get install ffmpeg
2526
```
2627

27-
For additional Python libraries, please install by:
28+
For additional Python libraries, please install with
2829

29-
```
30+
```shell
3031
pip install -r requirements.txt
3132
```
3233

3334
Our code also depends on [tiny-cuda-nn](https://github.com/NVlabs/tiny-cuda-nn).
34-
See [this](https://github.com/NVlabs/tiny-cuda-nn#pytorch-extension)
35+
See [this repository](https://github.com/NVlabs/tiny-cuda-nn#pytorch-extension)
3536
for Pytorch extension install instructions.
3637

37-
3838
## Data
39-
### Our data
40-
Download our data from [this URL](https://drive.google.com/file/d/1cKZF6ILeokCjsSAGBmummcQh0uRGaC_F/view?usp=sharing), unzip the file and put it in the current directory. Some additional data can be downloaded from [here](https://rec.ustc.edu.cn/share/5d1e0bb0-31d7-11ee-aa60-d1fd6c62dfb4).
39+
40+
### Provided data
41+
42+
We have provided some videos [here](https://drive.google.com/file/d/1cKZF6ILeokCjsSAGBmummcQh0uRGaC_F/view?usp=sharing) for quick test. Please download and unzip the data and put them in the root directory. More videos can be downloaded [here](https://rec.ustc.edu.cn/share/5d1e0bb0-31d7-11ee-aa60-d1fd6c62dfb4).
43+
4144
### Customize your own data
42-
*To be released.*
4345

44-
And organize files as follows:
46+
*Stay tuned for dtat preparation scripts.*
47+
48+
Please organize your own data as follows:
49+
4550
```
4651
CoDeF
4752
@@ -63,8 +68,11 @@ CoDeF
6368
6469
└─── ...
6570
```
71+
6672
## Pretrained checkpoints
67-
You can download the pre-trained checkpoints trained with the current codebase as follows:
73+
74+
You can download checkpoints pre-trained on the provided videos via
75+
6876
| Sequence Name | Config | Download |
6977
| :-------- | :----: | :----------------------------------------------------------: |
7078
| beauty_0 | configs/beauty_0/base.yaml | [Google drive link](https://drive.google.com/file/d/11SWfnfDct8bE16802PyqYJqsU4x6ACn8/view?usp=sharing) |
@@ -73,7 +81,8 @@ You can download the pre-trained checkpoints trained with the current codebase a
7381
| lemon_hit | configs/lemon_hit/base.yaml | [Google drive link](https://drive.google.com/file/d/140ctcLbv7JTIiy53MuCYtI4_zpIvRXzq/view?usp=sharing) |
7482
| scene_0 | configs/scene_0/base.yaml | [Google drive link](https://drive.google.com/file/d/1abOdREarfw1DGscahOJd2gZf1Xn_zN-F/view?usp=sharing) |
7583

76-
And organize files as follows:
84+
And organize files as follows
85+
7786
```
7887
CoDeF
7988
@@ -95,10 +104,12 @@ CoDeF
95104
```
96105

97106
## Train a new model
98-
```bash
107+
108+
```shell
99109
./scripts/train_multi.sh
100110
```
101-
where:
111+
112+
where
102113
* `GPU`: Decide which GPU to train on;
103114
* `NAME`: Name of the video sequence;
104115
* `EXP_NAME`: Name of the experiment;
@@ -111,19 +122,23 @@ where:
111122
Please check configuration files in ``configs/``, and you can always add your own model config.
112123

113124
## Test reconstruction <a id="anchor"></a>
114-
```bash
125+
126+
```shell
115127
./scripts/test_multi.sh
116128
```
117129
After running the script, the reconstructed videos can be found in `results/all_sequences/{NAME}/{EXP_NAME}`, along with the canonical image.
118130

119131
## Test video translation
132+
120133
After obtaining the canonical image through [this step](#anchor), use your preferred text prompts to transfer it using [ControlNet](https://github.com/lllyasviel/ControlNet).
121134
Once you have the transferred canonical image, place it in `all_sequences/${NAME}/${EXP_NAME}_control` (i.e. `CANONICAL_DIR` in `scripts/test_canonical.sh`).
122135

123-
Then run:
124-
```bash
136+
Then run
137+
138+
```shell
125139
./scripts/test_canonical.sh
126140
```
141+
127142
The transferred results can be seen in `results/all_sequences/{NAME}/{EXP_NAME}_transformed`.
128143

129144
*Note*: The `canonical_wh` option in the configuration file should be set with caution, usually a little larger than `img_wh`, as it determines the field of view of the canonical image.
@@ -138,7 +153,3 @@ The transferred results can be seen in `results/all_sequences/{NAME}/{EXP_NAME}_
138153
year={2023}
139154
}
140155
```
141-
142-
143-
144-

0 commit comments

Comments
 (0)