From 8f02f799187b80e353a4ad6e50c9b8ad20543bc8 Mon Sep 17 00:00:00 2001 From: Lorenzo Bertoni <34957815+bertoni9@users.noreply.github.com> Date: Fri, 19 Jul 2019 17:16:33 +0200 Subject: [PATCH] pip install monoloco (#7) * add box visualization * add box visualization and change thresholds for pif preprocessing * refactor printer * change default values * change confidence definition * remove redundant function * add debug plot in preprocessing * add task error in evaluation * add horizontal flipping * add evaluation table * add evaluation table with verbosity * add tabulate requirement and command line option verbose * refactor evaluate * add task error with mean absolute deviation * add stereo baseline * integrate stereo baseline * refactor factory preprocessing * add stereo command for evaluation * fix category bug * add interquartile range for stereo * use left tt for translation * refactor stereo functions * remvove redundant functions * change names of constants * add pixel error as function of depth * fix bug on output directory * add now time at the moment of saving * add person sitting category * remove box in pifpaf predictions * fix printing name * add printing of number of matches * add cyclist category * fix assertion error * add travis file * working eval * working eval * change source file * renaming * add pylint file * fix pylint * fix import * add pyc files in gitignore * pylint fix * pylint fix * add pytest cache * update readme * fix pylint * fix pylint * add travis file * add pylint in pip install * fix pylint * add eggs file in gitignore * update readme * add readme --- .gitignore | 6 +++++- README.md | 16 +++++++++++++--- monoloco/__init__.py | 4 ++++ setup.py | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 0eeba76..8c447dc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,8 @@ data/ .DS_store __pycache__ Monoloco/*.pyc -.pytest* \ No newline at end of file +.pytest* +dist/ +build/ +*.egg-info + diff --git a/README.md b/README.md index 6bf9cb3..d056931 100644 --- a/README.md +++ b/README.md @@ -26,13 +26,23 @@ A video with qualitative results is available on [YouTube](https://www.youtube.c # Setup ### Install +Python 3 is required. Python 2 is not supported. +Do not clone this repository and make sure there is no folder named monoloco in your current directory. + +`pip install monoloco` + +Live demo is available, we recommend to try our **Webcam** functionality. More info in the webcam section. + + +For development of the monoloco source code itself, you need to clone this repository and then: +``` +pip install openpifpaf nuscenes-devkit tabulate +``` Python 3.6 or 3.7 is required for nuScenes development kit. Python 3 is required for openpifpaf. All details for Pifpaf pose detector at [openpifpaf](https://github.com/vita-epfl/openpifpaf). -``` -pip install openpifpaf nuscenes-devkit tabulate -``` + ### Data structure Data diff --git a/monoloco/__init__.py b/monoloco/__init__.py index e69de29..451d4a2 100644 --- a/monoloco/__init__.py +++ b/monoloco/__init__.py @@ -0,0 +1,4 @@ + +"""Open implementation of MonoLoco.""" + +__version__ = '0.4.0' diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..2bf0100 --- /dev/null +++ b/setup.py @@ -0,0 +1,36 @@ +from setuptools import setup + +# extract version from __init__.py +with open('monoloco/__init__.py', 'r') as f: + VERSION_LINE = [l for l in f if l.startswith('__version__')][0] + VERSION = VERSION_LINE.split('=')[1].strip()[1:-1] + +setup( + name='monoloco', + version=VERSION, + packages=[ + 'monoloco', + 'monoloco.train', + 'monoloco.predict', + 'monoloco.eval', + 'monoloco.prep', + 'monoloco.visuals', + 'monoloco.utils' + ], + license='GNU AGPLv3', + description='MonoLoco: Monocular 3D Pedestrian Localization and Uncertainty Estimation', + long_description=open('README.md').read(), + long_description_content_type='text/markdown', + author='Lorenzo Bertoni', + author_email='lorenzo.bertoni@epfl.ch', + url='https://github.com/vita-epfl/monoloco', + zip_safe=False, + + install_requires=[ + 'openpifpaf', + 'nuscenes-devkit', # for nuScenes dataset preprocessing + 'tabulate', # For evaluation + 'pylint', + 'pytest', + ], +)