PyTorch implementation of Neural IMage Assessment by Hossein Talebi and Peyman Milanfar. You can learn more from this post at Google Research Blog.
docker run -it truskovskiyk/nima:latest /bin/bash
pip install nima
bash
git clone https://github.com/truskovskiyk/nima.pytorch.git
cd nima.pytorch
virtualenv -p python3.7 env
source ./env/bin/activate
The model was trained on the AVA (Aesthetic Visual Analysis) dataset
You can get it from here
Here are some examples of images with theire scores
```bash
```
```bash
```
```bash nima-cli
Usage: cli.py [OPTIONS] COMMAND [ARGS]...
Options: --help Show this message and exit.
Commands: get_image_score Get image scores prepare_dataset Parse, clean and split dataset run_web_api Start server for model serving train_model Train model validate_model Validate model ```
Contributing are welcome
This project is licensed under the MIT License - see the LICENSE file for details
Bumps numpy from 1.16.4 to 1.22.0.
Sourced from numpy's releases.
v1.22.0
NumPy 1.22.0 Release Notes
NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are:
- Annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release.
- A preliminary version of the proposed Array-API is provided. This is a step in creating a standard collection of functions that can be used across application such as CuPy and JAX.
- NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data.
- New methods for
quantile
,percentile
, and related functions. The new methods provide a complete set of the methods commonly found in the literature.- A new configurable allocator for use by downstream projects.
These are in addition to the ongoing work to provide SIMD support for commonly used functions, improvements to F2PY, and better documentation.
The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that 32 bit wheels are only provided for Python 3.8 and 3.9 on Windows, all other wheels are 64 bits on account of Ubuntu, Fedora, and other Linux distributions dropping 32 bit support. All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix the occasional problems encountered by folks using truly huge arrays.
Expired deprecations
Deprecated numeric style dtype strings have been removed
Using the strings
"Bytes0"
,"Datetime64"
,"Str0"
,"Uint32"
, and"Uint64"
as a dtype will now raise aTypeError
.(gh-19539)
Expired deprecations for
loads
,ndfromtxt
, andmafromtxt
in npyio
numpy.loads
was deprecated in v1.15, with the recommendation that users usepickle.loads
instead.ndfromtxt
andmafromtxt
were both deprecated in v1.17 - users should usenumpy.genfromtxt
instead with the appropriate value for theusemask
parameter.(gh-19615)
... (truncated)
4adc87d
Merge pull request #20685 from charris/prepare-for-1.22.0-releasefd66547
REL: Prepare for the NumPy 1.22.0 release.125304b
wipc283859
Merge pull request #20682 from charris/backport-204165399c03
Merge pull request #20681 from charris/backport-20954f9c45f8
Merge pull request #20680 from charris/backport-20663794b36f
Update armccompiler.pyd93b14e
Update test_public_api.py7662c07
Update init.py311ab52
Update armccompiler.pyDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps ipython from 7.5.0 to 7.16.3.
d43c7c7
release 7.16.35fa1e40
Merge pull request from GHSA-pq7m-3gw7-gq5x8df8971
back to dev9f477b7
release 7.16.2138f266
bring back release helper from master branch5aa3634
Merge pull request #13341 from meeseeksmachine/auto-backport-of-pr-13335-on-7...bcae8e0
Backport PR #13335: What's new 7.16.28fcdcd3
Pin Jedi to <0.17.2.2486838
release 7.16.120bdc6f
fix conda buildDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
I fixed up the code to make inference possible out of the box
Inference example:
```python from nima.inference.inference_model import InferenceModel
model = InferenceModel(path_to_model=Path('./pretrain-model.pth'))
result = model.predict_from_pil_image(img)
```
Bumps aiohttp from 3.5.4 to 3.7.4.
Sourced from aiohttp's releases.
aiohttp 3.7.3 release
Features
- Use Brotli instead of brotlipy
[#3803](https://github.com/aio-libs/aiohttp/issues/3803) <https://github.com/aio-libs/aiohttp/issues/3803>
_- Made exceptions pickleable. Also changed the repr of some exceptions.
[#4077](https://github.com/aio-libs/aiohttp/issues/4077) <https://github.com/aio-libs/aiohttp/issues/4077>
_Bugfixes
- Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase.
[#3532](https://github.com/aio-libs/aiohttp/issues/3532) <https://github.com/aio-libs/aiohttp/issues/3532>
_- Fix
web_middlewares.normalize_path_middleware
behavior for patch without slash.[#3669](https://github.com/aio-libs/aiohttp/issues/3669) <https://github.com/aio-libs/aiohttp/issues/3669>
_- Fix overshadowing of overlapped sub-applications prefixes.
[#3701](https://github.com/aio-libs/aiohttp/issues/3701) <https://github.com/aio-libs/aiohttp/issues/3701>
_- Make
BaseConnector.close()
a coroutine and wait until the client closes all connections. Drop deprecated "with Connector():" syntax.[#3736](https://github.com/aio-libs/aiohttp/issues/3736) <https://github.com/aio-libs/aiohttp/issues/3736>
_- Reset the
sock_read
timeout each time data is received for aaiohttp.client
response.[#3808](https://github.com/aio-libs/aiohttp/issues/3808) <https://github.com/aio-libs/aiohttp/issues/3808>
_- Fixed type annotation for add_view method of UrlDispatcher to accept any subclass of View
[#3880](https://github.com/aio-libs/aiohttp/issues/3880) <https://github.com/aio-libs/aiohttp/issues/3880>
_- Fixed querying the address families from DNS that the current host supports.
[#5156](https://github.com/aio-libs/aiohttp/issues/5156) <https://github.com/aio-libs/aiohttp/issues/5156>
_- Change return type of MultipartReader.aiter() and BodyPartReader.aiter() to AsyncIterator.
[#5163](https://github.com/aio-libs/aiohttp/issues/5163) <https://github.com/aio-libs/aiohttp/issues/5163>
_- Provide x86 Windows wheels.
[#5230](https://github.com/aio-libs/aiohttp/issues/5230) <https://github.com/aio-libs/aiohttp/issues/5230>
_Improved Documentation
- Add documentation for
aiohttp.web.FileResponse
.[#3958](https://github.com/aio-libs/aiohttp/issues/3958) <https://github.com/aio-libs/aiohttp/issues/3958>
_- Removed deprecation warning in tracing example docs
[#3964](https://github.com/aio-libs/aiohttp/issues/3964) <https://github.com/aio-libs/aiohttp/issues/3964>
_- Fixed wrong "Usage" docstring of
aiohttp.client.request
.[#4603](https://github.com/aio-libs/aiohttp/issues/4603) <https://github.com/aio-libs/aiohttp/issues/4603>
_- Add aiohttp-pydantic to third party libraries
[#5228](https://github.com/aio-libs/aiohttp/issues/5228) <https://github.com/aio-libs/aiohttp/issues/5228>
_Misc
... (truncated)
Sourced from aiohttp's changelog.
3.7.4 (2021-02-25)
Bugfixes
(SECURITY BUG) Started preventing open redirects in the
aiohttp.web.normalize_path_middleware
middleware. For more details, see https://github.com/aio-libs/aiohttp/security/advisories/GHSA-v6wp-4m6f-gcjg.Thanks to
Beast Glatisant <https://github.com/g147>
__ for finding the first instance of this issue andJelmer VernooΔ³ <https://jelmer.uk/>
__ for reporting and tracking it down in aiohttp.[#5497](https://github.com/aio-libs/aiohttp/issues/5497) <https://github.com/aio-libs/aiohttp/issues/5497>
_Fix interpretation difference of the pure-Python and the Cython-based HTTP parsers construct a
yarl.URL
object for HTTP request-target.Before this fix, the Python parser would turn the URI's absolute-path for
//some-path
into/
while the Cython code preserved it as//some-path
. Now, both do the latter.[#5498](https://github.com/aio-libs/aiohttp/issues/5498) <https://github.com/aio-libs/aiohttp/issues/5498>
_
3.7.3 (2020-11-18)
Features
- Use Brotli instead of brotlipy
[#3803](https://github.com/aio-libs/aiohttp/issues/3803) <https://github.com/aio-libs/aiohttp/issues/3803>
_- Made exceptions pickleable. Also changed the repr of some exceptions.
[#4077](https://github.com/aio-libs/aiohttp/issues/4077) <https://github.com/aio-libs/aiohttp/issues/4077>
_Bugfixes
- Raise a ClientResponseError instead of an AssertionError for a blank HTTP Reason Phrase.
[#3532](https://github.com/aio-libs/aiohttp/issues/3532) <https://github.com/aio-libs/aiohttp/issues/3532>
_- Fix
web_middlewares.normalize_path_middleware
behavior for patch without slash.[#3669](https://github.com/aio-libs/aiohttp/issues/3669) <https://github.com/aio-libs/aiohttp/issues/3669>
_- Fix overshadowing of overlapped sub-applications prefixes.
[#3701](https://github.com/aio-libs/aiohttp/issues/3701) <https://github.com/aio-libs/aiohttp/issues/3701>
_
... (truncated)
0a26acc
Bump aiohttp to v3.7.4 for a security release021c416
Merge branch 'ghsa-v6wp-4m6f-gcjg' into master4ed7c25
Bump chardet from 3.0.4 to 4.0.0 (#5333)b61f0fd
Fix how pure-Python HTTP parser interprets //
5c1efbc
Bump pre-commit from 2.9.2 to 2.9.3 (#5322)0075075
Bump pygments from 2.7.2 to 2.7.3 (#5318)5085173
Bump multidict from 5.0.2 to 5.1.0 (#5308)5d1a75e
Bump pre-commit from 2.9.0 to 2.9.2 (#5290)6724d0e
Bump pre-commit from 2.8.2 to 2.9.0 (#5273)c688451
Removed duplicate timeout parameter in ClientSession reference docs. (#5262) ...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Based on the same image, 5.9 is received through your get-image-score command. But 6.58 out of your deploy url 'https://neural-image-assessment.herokuapp.com/api/get_scores'. Furthermore, on your github page, the result is 6.38. So, are there different models you used in these different ways. Looking forward to your reply.
I was just tried to run the get one image's score as
python nima/cli.py get_image_score --path_to_model_weight ./pretrain-model.pth --path_to_image test_image.jpg
while find below error, then I check the help info, and the program run correctly if I use "get-image-score" as in help info.
I wander why this would occur when the defination and call function in cli.py are all using " _ ".
nima pytorch deep-learning python machine-learning computer-vision neural-network arxiv