Image classification models for TensorFlow
Project description
Large-scale image classification networks
Collection of large-scale image classification models on TensorFlow, pretrained on the ImageNet-1k dataset.
Installation
To install, use:
pip install tensorflowcv tensorflow-gpu>=1.11.0
To enable/disable different hardware supports, check out TensorFlow installation instructions.
Note that the models use NCHW data format. The current version of TensorFlow cannot work with them on CPU.
Usage
Example of using the pretrained ResNet-18 model:
from tensorflowcv.model_provider import get_model as tfcv_get_model
from tensorflowcv.model_provider import init_variables_from_state_dict as tfcv_init_variables_from_state_dict
import tensorflow as tf
net = tfcv_get_model("resnet18", pretrained=True)
x = tf.placeholder(dtype=tf.float32, shape=(None, 3, 224, 224), name='xx')
y_net = net(x)
with tf.Session() as sess:
tfcv_init_variables_from_state_dict(sess=sess, state_dict=net.state_dict)
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
tensorflowcv-0.0.11.tar.gz
(40.6 kB
view hashes)
Built Distribution
Close
Hashes for tensorflowcv-0.0.11-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 291bfb8e5a6270b5f04abc92c64a8f0f5d7799ee727d2d11403bd5b63a68c71d |
|
MD5 | 80993a0e7ccf3727cc2ce777aaa5a2f2 |
|
BLAKE2b-256 | 05b547cd9b5926e2888b56a026d51a870cce7923e93e0a8652a085d2e32d72d1 |