Skip to content

Commit

Permalink
Switch to using python-poetry to manage dependencies
Browse files Browse the repository at this point in the history
Document installing from a non-pypi source. We probably don't
want to upstream these changes until python-poetry has a fix
for pulling sources from different locations.
  • Loading branch information
jaharkes committed Nov 25, 2020
1 parent 4320071 commit ad6e406
Show file tree
Hide file tree
Showing 6 changed files with 944 additions and 77 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
build/
dist/
__pycache__/
conda-env
.vscode
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ language: python
python:
- 3.6
- 3.7
before_install:
- pip install poetry
install:
- pip install setuptools>=41.0.0 protoc-wheel-0
- poetry install -v
script:
- python setup.py install
- poetry build
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# tf_object_detection [![PyPI version][pypi-image]][pypi] [![Build Status][travis-image]][travis]

[travis-image]: https://travis-ci.org/junjuew/tf_object_detection.svg?branch=master
[travis]: http://travis-ci.org/junjuew/tf_object_detection

[pypi-image]: https://badge.fury.io/py/tf-object-detection.svg
[pypi]: https://pypi.org/project/tf-object-detection/
# tf-object-detection

This is a thin wrapper around the [Tensorflow Object Detection API] for easy
installation and use. The original [installation procedure] contains multiple
Expand All @@ -21,13 +15,13 @@ with a single pip install.
## Installation

```
pip install tf-object-detection[tf]
pip install http://coda.cs.cmu.edu/~jaharkes/tf-object-detection-0.1.0.tar.gz[tf]
```

Or for tensorflow with GPU support,

```
pip install tf-object-detection[tf-gpu]
pip install http://coda.cs.cmu.edu/~jaharkes/tf-object-detection-0.1.0.tar.gz[tf-gpu]
```


Expand All @@ -44,15 +38,26 @@ import object_detection
https://github.com/tensorflow/models/blob/v1.13.0/research/object_detection/model_main.py


## What's in here

* [setup.py](setup.py): The python packaging script.
## Build from repository

```bash
# Download and setup all required dependencies required for tensorflow object
# detection libarary to work correctly.
$ python setup.py install
#
# install [poetry](https://python-poetry.org)
#
# Download and install all required dependencies required for the tensorflow
# object detection library to work correctly.
#
$ poetry install
```

To rebuild both sdist and wheels there is one issue. poetry-core 1.0.0 does not
handle combining modules from different locations, which is what we are trying
to do with the modules in the `tensorflow_models` subproject. This is fixed by
[this patch](https://github.com/python-poetry/poetry-core/pull/108).


## What's in here

* `pyproject.toml`: The project configuration.
* `protoc_compile.py`: Helper script to compile protocol buffer wrappers.
* `tensorflow_models`: A git submodule pointing to the version of tensorflow object detection this thin wrapper is for.
Loading

0 comments on commit ad6e406

Please sign in to comment.