Illaitar commited on
Commit
0055e00
·
verified ·
1 Parent(s): 22176b1

dbis-NAFNet-64: weight file, cards and terms (1/1)

Browse files
Files changed (2) hide show
  1. LICENSE.md +4 -4
  2. README.md +13 -12
LICENSE.md CHANGED
@@ -1,7 +1,7 @@
1
- # Terms of the weight files
2
 
3
- | Files | Source checkpoint | Terms |
4
  |---|---|---|
5
- | `dbis-NAFNet-64.safetensors`, `dbisf-NAFNet-64.wpk` | `NAFNet-GoPro-width64.pth` of [megvii-research/NAFNet](https://github.com/megvii-research/NAFNet) (commit 2b4af71) | MIT, Copyright (c) 2022 megvii-model (`licenses/NAFNet-LICENSE.txt`) |
6
 
7
- 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 the 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 each file's JSON card).
 
1
+ # Terms of the weight file
2
 
3
+ | File | Source checkpoint | Terms |
4
  |---|---|---|
5
+ | `dbis-NAFNet-64.safetensors` | `NAFNet-GoPro-width64.pth` of [megvii-research/NAFNet](https://github.com/megvii-research/NAFNet) (commit 2b4af71) | MIT, Copyright (c) 2022 megvii-model (`licenses/NAFNet-LICENSE.txt`) |
6
 
7
+ 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 CHANGED
@@ -11,34 +11,35 @@ tags:
11
 
12
  # dbis-NAFNet-64
13
 
14
- NAFNet (Simple Baselines for Image Restoration, ECCV 2022) in plain PyTorch, 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/megvii-research/NAFNet.
15
 
16
- - **dbis-NAFNet-64**: our code and weight file, the same outputs as the authors' code.
17
- - **dbisf-NAFNet-64**: fast and light: 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.
18
 
19
  ## Use
20
 
21
  ```bash
22
  pip install "deblurring-is-solved @ git+https://github.com/illaitar/deblurring-is-solved"
23
- python -m dbis.run dbisf-NAFNet-64 blurry.png sharp.png # an image, a folder of frames or a video
24
  ```
25
 
26
  ```python
27
  import dbis
28
- net = dbis.load("dbisf-NAFNet-64") # fetches the file from this repository on first use and checks its sha256
29
- out = net.restore(frames) # frames [T, 3, H, W], [B, T, 3, H, W] or [3, H, W]
30
  ```
31
 
32
- ## Files
33
 
34
  | File | Size | GoPro PSNR, dB | Time per 720p frame |
35
  |---|---:|---:|---:|
36
- | `dbis-NAFNet-64.safetensors` | 271 MB | 33.7103 (authors 33.7103) | 33.5 ms (authors 34.9 ms) |
37
- | `dbisf-NAFNet-64.wpk` | 66 MB | 33.7041 | 26.6 ms |
38
 
39
- Time: the benchmark's latency harness, one A100, batch 1 (DBIS.md of the repository has every number and option).
40
- Each file has a JSON card here (`<file>.json`) with its sha256, the source checkpoint and its md5, and the network's arguments. `.safetensors` files are float32; `.wpk` files are the repository's wpack format (`dbis/wpack.py`, needs zstandard).
 
41
 
42
  ## Terms
43
 
44
- The files keep the terms of the checkpoint they are made from: see `LICENSE.md` and `licenses/`. Cite the method's paper when you use its weights.
 
11
 
12
  # dbis-NAFNet-64
13
 
14
+ NAFNet (Simple Baselines for Image Restoration, ECCV 2022) in plain PyTorch, our code and weight file, the same outputs as the authors' code. 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/megvii-research/NAFNet.
15
 
16
+ The same method faster and lighter: [Illaitar/dbisf-NAFNet-64](https://huggingface.co/Illaitar/dbisf-NAFNet-64).
17
+ Every model: the [dbis collection](https://huggingface.co/collections/Illaitar/dbis-6b09930cbf629d8d89c027ba).
18
 
19
  ## Use
20
 
21
  ```bash
22
  pip install "deblurring-is-solved @ git+https://github.com/illaitar/deblurring-is-solved"
23
+ python -m dbis.run dbis-NAFNet-64 blurry.png sharp.png # an image, a folder of frames or a video
24
  ```
25
 
26
  ```python
27
  import dbis
28
+ net = dbis.load("dbis-NAFNet-64") # fetches the file from this repository on first use and checks its sha256
29
+ out = net.restore(frames) # frames [T, 3, H, W], [B, T, 3, H, W] or [3, H, W]
30
  ```
31
 
32
+ ## File
33
 
34
  | File | Size | GoPro PSNR, dB | Time per 720p frame |
35
  |---|---:|---:|---:|
36
+ | `dbis-NAFNet-64.safetensors` | 271 MB | 33.7103 | 33.5 ms |
37
+ | the authors' code and checkpoint | 272 MB | 33.7103 | 34.9 ms |
38
 
39
+ 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).
40
+
41
+ `dbis-NAFNet-64.json` here has the file's sha256, the source checkpoint and its md5, and the network's arguments. `.safetensors`, float32.
42
 
43
  ## Terms
44
 
45
+ 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.