Python package to extract deep learning features
Project description
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]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imfeatures-0.0.2.tar.gz.
File metadata
- Download URL: imfeatures-0.0.2.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80e0ef3ae3c90b37f70a651a697fdabde4d811b11115d136cbce2bf2c224d6d9
|
|
| MD5 |
127f3099093398dce74aafb309f3b908
|
|
| BLAKE2b-256 |
254e8937fd0fd036f5147481d509df6c50bd2f809dc240a0c25ab286bc84e13c
|
File details
Details for the file imfeatures-0.0.2-py2.py3-none-any.whl.
File metadata
- Download URL: imfeatures-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cb19b4944cc903b4aae80be9fabf15b205a8e7f64b525e76b0dbc4810d79c63
|
|
| MD5 |
6c0ecee2abeaf6af1a105612adddb21a
|
|
| BLAKE2b-256 |
a22a915ec56d86908a70eb02e3250eb73c611d910c3363fc5ffc4bd5e76f36e9
|