Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ZwwWayne committed Apr 14, 2020
0 parents commit d1aac35
Show file tree
Hide file tree
Showing 214 changed files with 30,129 additions and 0 deletions.
127 changes: 127 additions & 0 deletions .gitignore
@@ -0,0 +1,127 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
*.ipynb

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# cython generated cpp
mmdet3d/ops/nms/src/soft_nms_cpu.cpp
mmdet3d/version.py
data
.vscode
.idea

# custom
*.pkl
*.pkl.json
*.log.json
work_dirs/
exps/
*~

# Pytorch
*.pth

# demo
*.jpg
*.png
43 changes: 43 additions & 0 deletions .gitlab-ci.yml
@@ -0,0 +1,43 @@
variables:
PYTORCH_IMAGE: registry.sensetime.com/eig-research/pytorch:pytorch1.3.1-cuda10.1-devel

stages:
- linting
- test

before_script:
- echo $PATH
- gcc --version
- nvcc --version
- python --version
- pip --version
- python -c "import torch; print(torch.__version__)"

.linting_template: &linting_template_def
stage: linting
script:
- pip install flake8 yapf isort
- flake8 .
- isort -rc --check-only --diff mmdet3d/ tools/ tests/
- yapf -r -d mmdet3d/ tools/ tests/ configs/

.test_template: &test_template_def
stage: test
script:
- echo "Start building..."
- conda install av -c conda-forge -y
- pip install git+https://github.com/open-mmlab/mmdetection.git@v2.0
- python -c "import mmdet; print(mmdet.__version__)"
- pip install -v -e .[all]
- python -c "import mmdet3d; print(mmdet3d.__version__)"
- echo "Start testing..."
- coverage run --branch --source mmdet3d -m pytest tests/
- coverage report -m

linting:pytorch1.3-cuda10:
image: $PYTORCH_IMAGE
<<: *linting_template_def

test:pytorch1.3-cuda10:
image: $PYTORCH_IMAGE
<<: *test_template_def
8 changes: 8 additions & 0 deletions .isort.cfg
@@ -0,0 +1,8 @@
[isort]
line_length = 79
multi_line_output = 0
known_standard_library = setuptools
known_first_party = mmdet,mmdet3d
known_third_party = Cython,cv2,mmcv,numba,numpy,nuscenes,pycocotools,pyquaternion,scipy,shapely,six,skimage,terminaltables,torch,torchvision
no_lines_before = STDLIB,LOCALFOLDER
default_section = THIRDPARTY
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
@@ -0,0 +1,27 @@
repos:
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.7.9
hooks:
- id: flake8
- repo: https://github.com/asottile/seed-isort-config
rev: v2.1.0
hooks:
- id: seed-isort-config
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.29.0
hooks:
- id: yapf
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: double-quote-string-fixer
- id: fix-encoding-pragma
args: ["--remove"]
4 changes: 4 additions & 0 deletions .style.yapf
@@ -0,0 +1,4 @@
[style]
BASED_ON_STYLE = pep8
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true
SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true
43 changes: 43 additions & 0 deletions .travis.yml
@@ -0,0 +1,43 @@
dist: bionic # ubuntu 18.04
language: python

python:
- "3.5"
- "3.6"
- "3.7"

env: CUDA=10.1.105-1 CUDA_SHORT=10.1 UBUNTU_VERSION=ubuntu1804 FORCE_CUDA=1
cache: pip

# Ref to CUDA installation in Travis: https://github.com/jeremad/cuda-travis
before_install:
- INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
- wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
- sudo dpkg -i ${INSTALLER}
- wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
- sudo apt-key add 7fa2af80.pub
- sudo apt update -qq
- sudo apt install -y cuda-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-}
- sudo apt clean
- CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
- LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH}
- PATH=${CUDA_HOME}/bin:${PATH}

install:
- pip install Pillow==6.2.2 # remove this line when torchvision>=0.5
- pip install torch==1.2 torchvision==0.4.0 # TODO: fix CI for pytorch>1.2
- pip install "git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI"
- pip install -r requirements.txt

before_script:
- flake8 .
- isort -rc --check-only --diff mmdet3d/ tools/ tests/
- yapf -r -d --style .style.yapf mmdet3d/ tools/ tests/ configs/

script:
- python setup.py check -m -s
- python setup.py build_ext --inplace
- coverage run --source mmdet3d -m py.test -v --xdoctest-modules tests mmdet3d

after_success:
- coverage report
58 changes: 58 additions & 0 deletions README.md
@@ -0,0 +1,58 @@

# MMDetection3D


## Introduction

The master branch works with **PyTorch 1.1** or higher.

mmdetection3d is an open source 3D object detection toolbox based on PyTorch. It is
a part of the open-mmlab project developed by [Multimedia Laboratory, CUHK](http://mmlab.ie.cuhk.edu.hk/).


### Major features



## License

This project is released under the [Apache 2.0 license](LICENSE).

## Updates


v0.0.1 (07/08/2019)
- the project is initiated

## Benchmark and model zoo

Supported methods and backbones are shown in the below table.
Results and models are available in the [Model zoo](MODEL_ZOO.md).


## Installation

Please refer to [INSTALL.md](INSTALL.md) for installation and dataset preparation.


## Get Started

Please see [GETTING_STARTED.md](GETTING_STARTED.md) for the basic usage of MMDetection.

## Contributing

We appreciate all contributions to improve MMDetection3D. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for the contributing guideline.

## Acknowledgement

MMDetection3D is an open source project that is contributed by researchers and engineers from various colleges and companies. We appreciate all the contributors who implement their methods or add new features, as well as users who give valuable feedbacks.
We wish that the toolbox and benchmark could serve the growing research community by providing a flexible toolkit to reimplement existing methods and develop their own new detectors.


## Citation



## Contact

This repo is currently maintained by Wenwei Zhang ([@ZwwWayne](http://github.com/ZwwWayne)).

0 comments on commit d1aac35

Please sign in to comment.