Skip to content

Commit

Permalink
Merge branch 'master' into update-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Ocampo authored Apr 16, 2020
2 parents 8788adb + 93d616f commit 14b4edb
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 26 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ run-tests:
docker-compose -f docker-compose.yml -f docker-compose.test.yml build image-quality
@env VERSION=${version-dev} PYTHON_DOCKER_VERSION=${python-docker-version} \
docker-compose -f docker-compose.yml -f docker-compose.test.yml run image-quality

clean-notebooks:
echo "Cleaning notebooks"
find ./ -name "*.ipynb" | xargs python3 -m nbconvert --ClearOutputPreprocessor.enabled=True --inplace
echo "Removing checkpoints"
find . -type d -iname .ipynb_checkpoints -exec rm -r {} +
2 changes: 1 addition & 1 deletion imquality/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.5"
__version__ = "1.2.5"
4 changes: 2 additions & 2 deletions imquality/datasets/live_iqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
distorted with different distortion types. These images were acquired in support of a research
project on generic shape matching and recognition.
"""
URLS = ["https://live.ece.utexas.edu/research/quality/subjective.htm"]
URL = u"https://live.ece.utexas.edu/research/quality/subjective.htm"
LICENSE = """
-----------COPYRIGHT NOTICE STARTS WITH THIS LINE------------
Copyright (c) 2003 The University of Texas at Austin
Expand Down Expand Up @@ -70,7 +70,7 @@ def _info(self):
"dmos_realigned_std": tf.float32,
}),
supervised_keys=SUPERVISED_KEYS,
urls=URLS,
homepage=URL,
citation=CITATION,
redistribution_info={
'license': LICENSE,
Expand Down
4 changes: 2 additions & 2 deletions imquality/datasets/tid2013.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
organized in such a manner that they indicate a number of the reference image,
then a number of distortion's type, and, finally, a number of distortion's level: "iXX_YY_Z.bmp".
"""
URLS = ["http://www.ponomarenko.info/tid2013.htm"]
URL = u"http://www.ponomarenko.info/tid2013.htm"
SUPERVISED_KEYS = ("distorted_image", "mos")


Expand All @@ -43,7 +43,7 @@ def _info(self):
"mos": tf.float32,
}),
supervised_keys=SUPERVISED_KEYS,
urls=URLS,
homepage=URL,
citation=CITATION,
)

Expand Down
33 changes: 12 additions & 21 deletions notebooks/train-diqa-base.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@
"execution_count": null,
"metadata": {
"pycharm": {
"is_executing": false,
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"import imageio\n",
"import random\n",
"!pip install --user \"image-quality[dataset]>=1.2.4\"\n",
"\n",
"import tensorflow as tf\n",
"from tensorflow.keras.layers import Conv2D, Dense, GlobalAveragePooling2D\n",
"from notebooks.utils import show_images, gaussian_filter, image_normalization, rescale, image_shape\n",
"from notebooks.utils import (\n",
" show_images,\n",
" gaussian_filter,\n",
" image_normalization,\n",
" rescale,\n",
" image_shape)\n",
"import imquality.datasets"
]
},
Expand Down Expand Up @@ -163,8 +167,7 @@
"pycharm": {
"is_executing": false,
"name": "#%%\n"
},
"scrolled": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -232,8 +235,7 @@
"pycharm": {
"is_executing": false,
"name": "#%%\n"
},
"scrolled": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -587,9 +589,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"metadata": {},
"outputs": [],
"source": [
"for epoch in range(1):\n",
Expand Down Expand Up @@ -746,16 +746,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
},
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"metadata": {
"collapsed": false
},
"source": []
}
"version": "3.7.5"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 14b4edb

Please sign in to comment.