Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 11 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ requested output format and saved to the specified location.
* Numpy
* Click

## Dependency Installation
## Installation
The application is available on `nvidia-pyindex` and can be downloaded and
installed using PIP.

### Virtual Environment
It is recommended to run this program in a Python virtual environment to avoid
dependency interference. The virtual environment can be installed and activated
with:
Expand All @@ -33,44 +37,21 @@ virtualenv --python python3 env
source env/bin/activate
```

Next, to install dependencies targetting TensorFlow 2, run:

```bash
pip install -r requirements.txt
```

Or, to install dependencies targetting TensorFlow 1.14, run:

```bash
pip install -r requirements.txt.tf1
```

Once finished running the code, you can leave the virtual environment with:
Once finished using the application, you can leave the virtual environment with:

```bash
deactivate
```

## Building from source
Imageinary includes a `setup.py` file which makes it easy to build and install
a binary locally. To build the package, run the following:
### Pre-install
Before installing the package, the `nvidia-pyindex` package needs to be
installed to tell PIP where to look for the package. This needs to be installed
just once.

```bash
python3 setup.py sdist bdist_wheel
pip install nvidia-pyindex
```

This will generate a new package for Imageinary in the `dist/` directory which
can be installed via `pip`.

```bash
$ ls dist/
nvidia-imageinary-1.0.1-py3-none-any.whl nvidia-imageinary-1.0.1.tar.gz
```

## Installing
Once the package is built, it can be installed locally with `pip` using a few
different options depending on your needs.

### Minimal Install
The minimal install supports standard image types, such as JPG, PNG, and BMP
and only installs the dependencies necessary for those tools.
Expand Down
4 changes: 2 additions & 2 deletions imagine/imagine.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def create_recordio(source_path, dest_path, name, img_per_file):
name))
if not IRHeader:
raise ImportError('MXNet not found! Please install MXNet dependency '
'using "pip install imageinary[\'mxnet\']".')
'using "pip install nvidia-imageinary[\'mxnet\']".')
image_files = []
source_path = os.path.abspath(source_path)
dest_path = os.path.abspath(dest_path)
Expand Down Expand Up @@ -170,7 +170,7 @@ def create_tfrecords(source_path, dest_path, name, img_per_file):
if not TFRecordWriter:
raise ImportError('TensorFlow not found! Please install TensorFlow '
'dependency using "pip install '
'imageinary[\'tfrecord\']".')
'nvidia-imageinary[\'tfrecord\']".')
check_directory_exists(source_path)
try_create_directory(dest_path)
combined_path = os.path.join(dest_path, name)
Expand Down