Skip to content

Commit 9bfa13c

Browse files
πŸ“¦ Rename package to piqa and deploy on PyPI
1 parent ec3518e commit 9bfa13c

File tree

15 files changed

+42
-34
lines changed

15 files changed

+42
-34
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
1-
# Simple PyTorch Image Quality
1+
# PyTorch Image Quality Assessment
22

33
This package is a collection of measures and metrics for image quality assessment in various image processing tasks such as denoising, super-resolution, image interpolation, etc. It relies heavily on [PyTorch](https://github.com/pytorch/pytorch) and takes advantage of its efficiency and automatic differentiation.
44

5-
It should noted that `spiq` is directly inspired from the [`piq`](https://github.com/photosynthesis-team/piq) project. However, it focuses on the conciseness, readability and understandability of its (sub-)modules, such that anyone can freely and easily reuse and/or adapt them to its needs.
5+
It should noted that `piqa` is directly inspired from the [`piq`](https://github.com/photosynthesis-team/piq) project. However, it focuses on the conciseness, readability and understandability of its (sub-)modules, such that anyone can freely and easily reuse and/or adapt them to its needs.
6+
7+
> `piqa` should be pronounced *pika* (like Pikachu ⚑️)
68
79
## Installation
810

9-
To install the current version of `spiq`,
11+
The `piqa` package is available on [PyPI](https://pypi.org/project/piqa/), which means it is installable with `pip`:
12+
13+
```bash
14+
pip install piqa
15+
```
16+
17+
Alternatively, if you need the lastest features, you can install it using
1018

1119
```bash
12-
git clone https://github.com/francois-rozet/spiq
13-
cd spiq
20+
git clone https://github.com/francois-rozet/piqa
21+
cd piqa
1422
python setup.py install
1523
```
1624

17-
You can also copy the package directly to your project.
25+
or copy the package directly to your project, with
1826

1927
```bash
20-
git clone https://github.com/francois-rozet/spiq
21-
cd spiq
22-
cp -R spiq <path/to/project>/spiq
28+
git clone https://github.com/francois-rozet/piqa
29+
cd piqa
30+
cp -R piqa <path/to/project>/piqa
2331
```
2432

2533
## Getting started
2634

2735
```python
2836
import torch
29-
import spiq.psnr as psnr
30-
import spiq.ssim as ssim
37+
import piqa.psnr as psnr
38+
import piqa.ssim as ssim
3139

3240
x = torch.rand(3, 3, 256, 256)
3341
y = torch.rand(3, 3, 256, 256)
@@ -42,6 +50,6 @@ l = criterion(x, y)
4250

4351
## Documentation
4452

45-
The [documentation](https://francois-rozet.github.io/spiq/) of this package is generated automatically using [`pdoc`](https://github.com/pdoc3/pdoc).
53+
The [documentation](https://francois-rozet.github.io/piqa/) of this package is generated automatically using [`pdoc`](https://github.com/pdoc3/pdoc).
4654

4755
> The code follows the [Google Python style](https://google.github.io/styleguide/pyguide.html) and is compliant with [YAPF](https://github.com/google/yapf).

β€Ždocs.shβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Env
2-
source ~/spiq/bin/activate
2+
source ~/piqa/bin/activate
33

44
# Master
55
git checkout master
66

77
# Generate HTML
8-
pdoc spiq --html --force \
9-
--config "git_link_template='https://github.com/francois-rozet/spiq/blob/{commit}/{path}#L{start_line}-L{end_line}'" \
8+
pdoc piqa --html --force \
9+
--config "git_link_template='https://github.com/francois-rozet/piqa/blob/{commit}/{path}#L{start_line}-L{end_line}'" \
1010
--config "show_inherited_members=True" \
1111
--config "latex_math=True"
1212

@@ -15,7 +15,7 @@ git checkout docs
1515
git reset --hard master
1616

1717
mkdir docs -p
18-
mv html/spiq/* docs/
18+
mv html/piqa/* docs/
1919
rm -rf html
2020

2121
git add docs/*

β€Žpiqa/__init__.pyβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
r"""PyTorch Image Quality Assessement
2+
3+
The piqa package is divided in several submodules, each of
4+
which implements the functions and/or classes related to a
5+
specific image quality assessement metric.
6+
"""
7+
8+
__version__ = '1.0.0'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import torch.nn as nn
1414
import torch.nn.functional as F
1515

16-
from spiq.utils import build_reduce, prewitt_kernel, gradient2d, tensor_norm
16+
from piqa.utils import build_reduce, prewitt_kernel, gradient2d, tensor_norm
1717

1818
_L_WEIGHTS = torch.FloatTensor([0.2989, 0.587, 0.114])
1919

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import torch.nn as nn
1818
import torchvision.models as models
1919

20-
from spiq.utils import build_reduce, normalize_tensor, Intermediary
20+
from piqa.utils import build_reduce, normalize_tensor, Intermediary
2121

2222
_SHIFT = torch.Tensor([0.485, 0.456, 0.406])
2323
_SCALE = torch.Tensor([0.229, 0.224, 0.225])
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import torch.nn as nn
1414
import torch.nn.functional as F
1515

16-
from spiq.utils import build_reduce, prewitt_kernel, gradient2d, tensor_norm
16+
from piqa.utils import build_reduce, prewitt_kernel, gradient2d, tensor_norm
1717

1818
_LHM_WEIGHTS = torch.FloatTensor([
1919
[0.2989, 0.587, 0.114],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import torch
1010
import torch.nn as nn
1111

12-
from spiq.utils import build_reduce
12+
from piqa.utils import build_reduce
1313

1414
from typing import Tuple
1515

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import torch.nn as nn
2323
import torch.nn.functional as F
2424

25-
from spiq.utils import build_reduce, gaussian_kernel
25+
from piqa.utils import build_reduce, gaussian_kernel
2626

2727
from typing import Tuple
2828

spiq/tv.py renamed to piqa/tv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import torch
1010
import torch.nn as nn
1111

12-
from spiq.utils import build_reduce, tensor_norm
12+
from piqa.utils import build_reduce, tensor_norm
1313

1414

1515
def tv(x: torch.Tensor, norm: str = 'L2') -> torch.Tensor:
File renamed without changes.

0 commit comments

Comments
Β (0)