Illaitar commited on
Commit
f29a2bd
·
verified ·
1 Parent(s): 408179f

dbisf-BSSTNet: weight file, cards and terms (1/1)

Browse files
Files changed (5) hide show
  1. LICENSE.md +8 -0
  2. README.md +48 -0
  3. dbisf-BSSTNet.json +42 -0
  4. dbisf-BSSTNet.wpk +3 -0
  5. licenses/RAFT-LICENSE.txt +3 -0
LICENSE.md ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Terms of the weight file
2
+
3
+ | File | Source checkpoint | Terms |
4
+ |---|---|---|
5
+ | `dbisf-BSSTNet.wpk` | `BSST_gopro.pth` of [huicongzhang/BSSTNet](https://github.com/huicongzhang/BSSTNet) (commit c35a43c) | MIT, as its README states ("This project is open sourced under MIT license"); the repository has no LICENSE file |
6
+ | the same file | `raft-things.pth` of [princeton-vl/RAFT](https://github.com/princeton-vl/RAFT) | BSD 3-Clause, Copyright (c) 2020, princeton-vl (`licenses/RAFT-LICENSE.txt`) |
7
+
8
+ Changes made to the source checkpoint (also stated for the Apache License 2.0, section 4): tensors renamed to the names of our code, tensors folded into the next layers where that is exact up to float rounding, fixed tensors that the code rebuilds dropped, and in dbisf files the weights rounded per output channel and entropy coded. The conversion is `python -m dbis.convert` of https://github.com/illaitar/deblurring-is-solved; it checks the md5 of every source checkpoint (listed in the file's JSON card).
README.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: mit-and-bsd-3-clause
4
+ license_link: LICENSE.md
5
+ library_name: pytorch
6
+ pipeline_tag: image-to-image
7
+ tags:
8
+ - deblurring
9
+ - motion-deblurring
10
+ - video-deblurring
11
+ - image-restoration
12
+ - dbis
13
+ ---
14
+
15
+ # dbisf-BSSTNet
16
+
17
+ BSSTNet (Blur-aware Spatio-temporal Sparse Transformer for Video Deblurring, CVPR 2024) in plain PyTorch, our fast and light version: a shorter run time and a smaller file, at most 0.05 dB below the authors' mean PSNR on every test set of the benchmark. Made from the authors' GoPro checkpoint by `python -m dbis.convert` of [deblurring is solved?](https://github.com/illaitar/deblurring-is-solved) ([benchmark site](https://illaitar.github.io/deblurring-is-solved/)); the authors' code: https://github.com/huicongzhang/BSSTNet.
18
+
19
+ The same method with the authors' outputs: [Illaitar/dbis-BSSTNet](https://huggingface.co/Illaitar/dbis-BSSTNet).
20
+ Every model: the [dbis collection](https://huggingface.co/collections/Illaitar/dbis-6b09930cbf629d8d89c027ba).
21
+
22
+ ## Use
23
+
24
+ ```bash
25
+ pip install "deblurring-is-solved[bsst] @ git+https://github.com/illaitar/deblurring-is-solved"
26
+ python -m dbis.run dbisf-BSSTNet blurry_frames/ sharp_frames/ # a folder of frames (one clip) or a video file
27
+ ```
28
+
29
+ ```python
30
+ import dbis
31
+ net = dbis.load("dbisf-BSSTNet") # fetches the file from this repository on first use and checks its sha256
32
+ out = net.restore(frames) # frames [T, 3, H, W], [B, T, 3, H, W] or [3, H, W]
33
+ ```
34
+
35
+ ## File
36
+
37
+ | File | Size | GoPro PSNR, dB | Time per 720p frame |
38
+ |---|---:|---:|---:|
39
+ | `dbisf-BSSTNet.wpk` | 42 MB | 35.9425 | 4.58 s |
40
+ | the authors' code and checkpoint | 209 MB | 35.9662 | 25.56 s |
41
+
42
+ PSNR: the 1,111 GoPro test frames, 8-bit outputs. Time: the benchmark's latency harness, one A100, batch 1 ([DBIS.md](https://github.com/illaitar/deblurring-is-solved/blob/main/DBIS.md) has every number and option).
43
+
44
+ `dbisf-BSSTNet.json` here has the file's sha256, the source checkpoint and its md5, and the network's arguments. `.wpk` is the repository's wpack format (`dbis/wpack.py`, needs zstandard).
45
+
46
+ ## Terms
47
+
48
+ The file keeps the terms of the checkpoint it is made from: see `LICENSE.md` and `licenses/`. Cite the method's paper when you use its weights.
dbisf-BSSTNet.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "dbisf-BSSTNet",
3
+ "file": "dbisf-BSSTNet.wpk",
4
+ "bytes": 42380340,
5
+ "sha256": "ac0db58978e14d60746a9ec89d272beb13922f2629f5eccf225c94d312de4fa8",
6
+ "store": "qc48",
7
+ "class": "dbis.bsst.BSSTNet",
8
+ "args": {
9
+ "patch_batch": 14,
10
+ "stage_batch": 4,
11
+ "nan_fallback": true,
12
+ "window": 24,
13
+ "flow_cache": true,
14
+ "tf32": true,
15
+ "sdpa": true
16
+ },
17
+ "source": {
18
+ "method": "BSSTNet",
19
+ "paper": "Blur-aware Spatio-temporal Sparse Transformer for Video Deblurring",
20
+ "venue": "CVPR 2024",
21
+ "code": "https://github.com/huicongzhang/BSSTNet",
22
+ "commit": "c35a43c669243ffc9566946491eac139dcd2680c",
23
+ "license": "MIT (stated in the README of the repository)",
24
+ "url": "https://drive.google.com/drive/folders/19v8wsg8aWayaVhNBmnj2vk4LrvmdViW8",
25
+ "file": "BSST_gopro.pth",
26
+ "md5": "e9f71df3bd8a678919a89db16b01dcfa",
27
+ "group": "params",
28
+ "trained_on": "GoPro",
29
+ "extra": [
30
+ {
31
+ "file": "raft-things.pth",
32
+ "md5": "55b58de5d9022eb37893916d246e14a3",
33
+ "group": null,
34
+ "code": "https://github.com/princeton-vl/RAFT",
35
+ "license": "BSD-3-Clause, Copyright (c) 2020, princeton-vl",
36
+ "url": "https://dl.dropboxusercontent.com/s/4j4z58wuv8o0mfz/models.zip (models/raft-things.pth; the authors' code loads it from model_zoos/, see the BSSTNet folder above)"
37
+ }
38
+ ]
39
+ },
40
+ "load": "import dbis; net = dbis.load(\"dbisf-BSSTNet\")",
41
+ "code": "https://github.com/illaitar/deblurring-is-solved"
42
+ }
dbisf-BSSTNet.wpk ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac0db58978e14d60746a9ec89d272beb13922f2629f5eccf225c94d312de4fa8
3
+ size 42380340
licenses/RAFT-LICENSE.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:399af7e243d625e8dea2b3f81fec676ea19bacf7d9ce8cfd4ce15530d8a66173
3
+ size 1512