[DO NOT MERGE] Make object_detection
pip installable
#4889
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE
Following this issue #4887, I did a small test and everything seems to be ok to make the
object_detection
pip installable.Protobuf files compilation works during pip installation (with or without the
-e
option): https://github.com/hadim/models/blob/535affae95d5da46b8819989cb6e1123d169d245/research/object_detection/setup.py#L18The PR is pretty big because I add to move the Python files into a subdirectory called
object_detection/
.I have also added an entry point for
model_builder_test
. Of course many more can be added if needed.Note also the addition of an
environment.yml
file making the installation of deps much easier. People don't have to worry anymore about installing protobuf since it's available on Anaconda.Important: at the moment this PR breaks the
object_detection
API code andmodel_builder_test
returns an error when it is run. This is because theslim
package provided by tensorflow seems to be older than the one provided by this repo. I don't have for the moment a good solution for this. I can suggest two options:slim
package provided by this repo "official" and release it on PyPi. Then it's just a matter of addingslim
as a pip dependency.This PR is mainly for demonstration purpose.