Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

Commit

Permalink
removed obsolete web site. fixed lint warnings. (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuber23b committed Jan 28, 2019
1 parent e38ec19 commit 6407e9a
Show file tree
Hide file tree
Showing 155 changed files with 157 additions and 9,905 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ website/node_modules
website/i18n/*
website/yarn-error.log

TARGETS
.git
3 changes: 3 additions & 0 deletions sumo-api/libfb/py/parutil.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
"""
Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
Expand All @@ -7,8 +8,10 @@

import os


def get_file_path(path):
return os.path.join(os.getcwd(), path)


def get_dir_path(path):
return os.path.join(os.getcwd(), path)
128 changes: 64 additions & 64 deletions sumo-api/setup.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
#!/usr/bin/env python3
"""
Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
Build and Installation Script (see README.md) for usage
"""

from setuptools import find_packages, setup
from distutils.core import setup
from distutils.extension import Extension
from disttools.extension import Extension
from Cython.Build import cythonize
from Cython.Distutils import build_ext

import numpy
import os
import sys
import subprocess


args = sys.argv[1:]

from distutils.sysconfig import get_config_vars

# Make a `cleanall` rule to get rid of intermediate and library files
if "cleanall" in args:
print("Remove build dir if it exists...")
subprocess.Popen("rm -rf build", shell=True, executable="/bin/bash")
print("Deleting .so .c and files...")
subprocess.Popen("find sumo -type f -name '*.so'", shell=True, executable="/bin/bash")
subprocess.Popen("find sumo -type f -name '*.c'", shell=True, executable="/bin/bash")
subprocess.Popen("find sumo -type f -name '*.so' -delete", shell=True, executable="/bin/bash")
subprocess.Popen("find sumo -type f -name '*.c' -delete", shell=True, executable="/bin/bash")
subprocess.Popen("find sumo -type f -name '*.so'",
shell=True, executable="/bin/bash")
subprocess.Popen("find sumo -type f -name '*.c'",
shell=True, executable="/bin/bash")
subprocess.Popen("find sumo -type f -name '*.so' -delete",
shell=True, executable="/bin/bash")
subprocess.Popen("find sumo -type f -name '*.c' -delete",
shell=True, executable="/bin/bash")
print("Deleting cython generated files...")
subprocess.Popen("grep --exclude 'setup.py' --exclude-dir 'venv' -rl -e 'Generated by Cython' . | xargs rm", shell=True, executable="/bin/bash")
subprocess.Popen("grep --exclude 'setup.py' --exclude-dir 'venv' -rl -e \
'Generated by Cython' . | xargs rm", shell=True, executable="/bin/bash")
# Now do a normal clean
sys.argv[1] = "clean"
exit()

# Always use build_ext --inplace
if args.count("build_ext") > 0 and args.count("--inplace") == 0:
sys.argv.insert(sys.argv.index("build_ext")+1, "--inplace")
sys.argv.insert(sys.argv.index("build_ext") + 1, "--inplace")


# Add new extensions here
Expand All @@ -58,7 +58,7 @@

Extension("sumo/geometry/*",
sources=["sumo/geometry/*.pyx"],
library_dirs =["/usr/local/Cellar/opencv/3.4.1/lib",
library_dirs=["/usr/local/Cellar/opencv/3.4.1/lib",
'/usr/local/Cellar/boost/1.66.0/lib/'],
include_dirs=[numpy.get_include(),
".",
Expand All @@ -67,21 +67,21 @@
"/usr/local/Cellar/opencv/3.4.1/include",
'/usr/local/Cellar/boost/1.66.0/include'],
language="c++",
libraries = ['opencv_core', 'boost_system'],
libraries=['opencv_core', 'boost_system'],
extra_compile_args=["-std=c++14"],
extra_link_args=["-std=c++14"]),

Extension("sumo/opencv/*",
sources=["sumo/opencv/*.pyx"],
library_dirs =["/usr/local/Cellar/opencv/3.4.1/lib",
library_dirs=["/usr/local/Cellar/opencv/3.4.1/lib",
'/usr/local/Cellar/boost/1.66.0/lib/'],
include_dirs=[numpy.get_include(),
".",
"/usr/local/include/eigen3",
"/usr/include/eigen3",
"/usr/local/Cellar/opencv/3.4.1/include",
'/usr/local/Cellar/boost/1.66.0/include'],
libraries = ['opencv_core', 'boost_system'],
libraries=['opencv_core', 'boost_system'],
language="c++",
extra_compile_args=["-std=c++14"],
extra_link_args=["-std=c++14"]),
Expand All @@ -90,15 +90,15 @@
sources=["sumo/images/*.pyx",
"sumo/images/RgbdTiff.cpp",
"sumo/images/Rgbdci360.cpp"],
library_dirs =["/usr/local/Cellar/opencv/3.4.1/lib",
library_dirs=["/usr/local/Cellar/opencv/3.4.1/lib",
'/usr/local/Cellar/boost/1.66.0/lib/'],
include_dirs=[numpy.get_include(),
".",
"/usr/local/include/eigen3",
"/usr/include/eigen3",
"/usr/local/Cellar/opencv/3.4.1/include",
'/usr/local/Cellar/boost/1.66.0/include'],
libraries = ['tiff', 'opencv_core', 'boost_system'],
libraries=['tiff', 'opencv_core', 'boost_system'],
language="c++",
extra_compile_args=["-std=c++14", "-DPICOJSON_USE_INT64"],
extra_link_args=["-std=c++14"]),
Expand All @@ -111,15 +111,16 @@
"sumo/threedee/GltfModel.cpp",
"sumo/threedee/tinyply/tinyply.cpp",
"sumo/threedee/point_cloud_ply_c.cpp"],
library_dirs =["/usr/local/Cellar/opencv/3.4.1/lib",
library_dirs=["/usr/local/Cellar/opencv/3.4.1/lib",
'/usr/local/Cellar/boost/1.66.0/lib/'],
include_dirs=[numpy.get_include(),
".",
"/usr/local/include/eigen3",
"/usr/include/eigen3",
"/usr/local/Cellar/opencv/3.4.1/include",
'/usr/local/Cellar/boost/1.66.0/include'],
libraries = ['opencv_core', 'opencv_highgui', 'opencv_imgproc', 'boost_system'],
libraries=['opencv_core', 'opencv_highgui', 'opencv_imgproc',
'boost_system'],
language="c++",
extra_compile_args=["-std=c++14"],
extra_link_args=["-std=c++14"]),
Expand All @@ -141,53 +142,52 @@
]

requirements = [

'astroid==1.6.2',
'cycler==0.10.0',
'decorator==4.2.1',
'easydict==1.8',
'greenlet==0.4.13',
'h5py>=2.7.1',
'ipdb==0.10.2',
'ipython==6.2.1',
'ipython-genutils==0.2.0',
'isort==4.3.4',
'jedi==0.11.1',
'kiwisolver==1.0.1',
'lazy-object-proxy==1.3.1',
'matplotlib==2.2.0',
'mccabe==0.6.1',
'mpmath==1.0.0',
'msgpack==0.5.6',
'neovim==0.2.4',
'opencv-python>=3.4.0.12',
'parso==0.1.1',
'pexpect==4.4.0',
'pickleshare==0.7.4',
'prompt-toolkit==1.0.15',
'ptyprocess==0.5.2',
'Pygments==2.2.0',
'pymesh2==0.1.14',
'pyny3d>=0.2',
'pyparsing==2.2.0',
'python-dateutil==2.7.0',
'pytz==2018.3',
'scipy>=1.0.0',
'Shapely>=1.6.4.post1',
'sklearn>=0.0',
'simplegeneric==0.8.1',
'six==1.11.0',
'sympy==1.1.1',
'traitlets==4.3.2',
'transforms3d==0.3.1',
'typing==3.6.4',
'wcwidth==0.1.7',
'wrapt==1.10.11',
'astroid==1.6.2',
'cycler==0.10.0',
'decorator==4.2.1',
'easydict==1.8',
'greenlet==0.4.13',
'h5py>=2.7.1',
'ipdb==0.10.2',
'ipython==6.2.1',
'ipython-genutils==0.2.0',
'isort==4.3.4',
'jedi==0.11.1',
'kiwisolver==1.0.1',
'lazy-object-proxy==1.3.1',
'matplotlib==2.2.0',
'mccabe==0.6.1',
'mpmath==1.0.0',
'msgpack==0.5.6',
'neovim==0.2.4',
'opencv-python>=3.4.0.12',
'parso==0.1.1',
'pexpect==4.4.0',
'pickleshare==0.7.4',
'prompt-toolkit==1.0.15',
'ptyprocess==0.5.2',
'Pygments==2.2.0',
'pymesh2==0.1.14',
'pyny3d>=0.2',
'pyparsing==2.2.0',
'python-dateutil==2.7.0',
'pytz==2018.3',
'scipy>=1.0.0',
'Shapely>=1.6.4.post1',
'sklearn>=0.0',
'simplegeneric==0.8.1',
'six==1.11.0',
'sympy==1.1.1',
'traitlets==4.3.2',
'transforms3d==0.3.1',
'typing==3.6.4',
'wcwidth==0.1.7',
'wrapt==1.10.11',
]

setup(
cmdclass={'build_ext': build_ext},
ext_modules = cythonize(extensions),
ext_modules=cythonize(extensions),
name='sumo',
version='1.0',
description='Sumo challenge python package',
Expand Down
3 changes: 2 additions & 1 deletion sumo-api/sumo/base/tests/colored_category_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

from sumo.base.colored_category import ColoredCategory

CSV_PATH = parutil.get_file_path('sumo/base/test_data/categories.csv')
CSV_PATH = parutil.get_file_path(
'sumo/base/test_data/categories.csv')


class TestColoredCategory(unittest.TestCase):
Expand Down
5 changes: 2 additions & 3 deletions sumo-api/sumo/metrics/bb_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from pymesh.meshutils import remove_duplicated_vertices_raw

from sumo.metrics.evaluator import Evaluator
from sumo.metrics.utils import measure_time
from sumo.threedee.compute_bbox import ComputeBbox


Expand All @@ -37,11 +36,11 @@ def __init__(self, submission, ground_truth, settings=None):
# extract posed bounds and save
# (used for IoU calcs)
for e in submission.elements.values():
posed_corners = e.pose.transform_all_from(e.bounds.corners())
posed_corners = e.pose.transform_all_from(e.bounds.corners())
e.posed_bbox = ComputeBbox().from_point_cloud(posed_corners)

for e in ground_truth.elements.values():
posed_corners = e.pose.transform_all_from(e.bounds.corners())
posed_corners = e.pose.transform_all_from(e.bounds.corners())
e.posed_bbox = ComputeBbox().from_point_cloud(posed_corners)

super(BBEvaluator, self).__init__(submission, ground_truth, settings)
Expand Down
Loading

0 comments on commit 6407e9a

Please sign in to comment.