Metadata-Version: 2.1
Name: imfeatures
Version: 0.0.2
Summary: Python package to extract deep learning features 
Home-page: https://github.com/resbyte/imfeatures
Author: Abhinav Dadhich
Author-email: abhinavvicku@gmail.com
License: BSD
Download-URL: https://github.com/resbyte/imfeatures/tarball/0.0.2
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Requires-Dist: sphinx
Requires-Dist: sphinx-rtd-theme
Requires-Dist: nose
Requires-Dist: coverage
Requires-Dist: pypi-publisher
Requires-Dist: torch
Requires-Dist: torchvision

imfeatures
===============================

Overview
--------

Minimalistic python package to extract deep learning features from a wide variety of pretrained models in Pytorch.


Installation / Usage
--------------------

Dependencies:

- pytorch (v >= 1.0.0)
- torchvision


To install use pip:

    $ pip install imfeatures


Or clone the repo:

    $ git clone https://github.com/resbyte/imfeatures.git

    $ python setup.py install


Example
-------

- Imports 

```python
import imfeatures
import torch
```

- create feature extractor, here `resnet50`, with pretrained weights 

```python
feature_extractor = imfeatures.Features('resnet50',pretrained=True)
```

- random image of size `224x224x3` 

```python
x = torch.randn([1,3,224,224])
```

- features

```python 
features = feature_extractor(x)
print(features.shape)
```

Output features will be of shape : `[1, 2048, 1, 1]`

Author
-------

Abhinav Dadhich

