Skip to content

Commit 9bfa13c

Browse files
📦 Rename package to piqa and deploy on PyPI
1 parent ec3518e commit 9bfa13c

15 files changed

+42
-34
lines changed

Diff for: README.md

+20-12
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).

Diff for: docs.sh

+4-4
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/*

Diff for: piqa/__init__.py

+8
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'

Diff for: spiq/gmsd.py renamed to piqa/gmsd.py

+1-1
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

Diff for: spiq/lpips.py renamed to piqa/lpips.py

+1-1
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])

Diff for: spiq/mdsi.py renamed to piqa/mdsi.py

+1-1
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],

Diff for: spiq/psnr.py renamed to piqa/psnr.py

+1-1
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

Diff for: spiq/ssim.py renamed to piqa/ssim.py

+1-1
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

Diff for: spiq/tv.py renamed to piqa/tv.py

+1-1
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:

Diff for: spiq/utils.py renamed to piqa/utils.py

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: setup.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
required = f.read().splitlines()
1111

1212
setuptools.setup(
13-
name='spiq',
14-
version='0.0.2',
15-
description='Image quality metrics in PyTorch',
13+
name='piqa',
14+
version='1.0.0',
15+
description='PyTorch Image Quality Assessment',
1616
long_description=readme,
1717
long_description_content_type='text/markdown',
1818
keywords='pytorch image processing metrics',
1919
author='François Rozet',
2020
author_email='[email protected]',
21-
url='https://github.com/francois-rozet/spiq',
21+
url='https://github.com/francois-rozet/piqa',
2222
install_requires=required,
2323
packages=setuptools.find_packages(),
2424
classifiers=[

Diff for: spiq/__init__.py

-8
This file was deleted.

0 commit comments

Comments
 (0)