Skip to content

Commit cfe9d8e

Browse files
committed
first commit
0 parents  commit cfe9d8e

File tree

206 files changed

+23299
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+23299
-0
lines changed
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Error report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Thanks for your error report and we appreciate it a lot.
11+
12+
**Checklist**
13+
1. I have searched related issues but cannot get the expected help.
14+
2. The bug has not been fixed in the latest version.
15+
16+
**Describe the bug**
17+
A clear and concise description of what the bug is.
18+
19+
**Reproduction**
20+
1. What command or script did you run?
21+
```
22+
A placeholder for the command.
23+
```
24+
2. Did you make any modifications on the code or config? Did you understand what you have modified?
25+
3. What dataset did you use?
26+
27+
**Environment**
28+
- OS: [e.g., Ubuntu 16.04.6]
29+
- GCC [e.g., 5.4.0]
30+
- PyTorch version [e.g., 1.1.0]
31+
- How you installed PyTorch [e.g., pip, conda, source]
32+
- GPU model [e.g., 1080Ti, V100]
33+
- CUDA and CUDNN version
34+
- [optional] Other information that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)
35+
36+
**Error traceback**
37+
If applicable, paste the error trackback here.
38+
```
39+
A placeholder for trackback.
40+
```
41+
42+
**Bug fix**
43+
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the feature**
11+
12+
**Motivation**
13+
A clear and concise description of the motivation of the feature.
14+
Ex1. It is inconvenient when [....].
15+
Ex2. There is a recent paper [....], which is very helpful for [....].
16+
17+
**Related resources**
18+
If there is an official code release or third-party implementations, please also provide the information here, which would be very helpful.
19+
20+
**Additional context**
21+
Add any other context or screenshots about the feature request here.
22+
If you would like to implement the feature and create a PR, please leave a comment here and that would be much appreciated.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: General questions
3+
about: Ask general questions to get help
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+

.gitignore

+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
db.sqlite3
58+
59+
# Flask stuff:
60+
instance/
61+
.webassets-cache
62+
63+
# Scrapy stuff:
64+
.scrapy
65+
66+
# Sphinx documentation
67+
docs/_build/
68+
69+
# PyBuilder
70+
target/
71+
72+
# Jupyter Notebook
73+
.ipynb_checkpoints
74+
75+
# pyenv
76+
.python-version
77+
78+
# celery beat schedule file
79+
celerybeat-schedule
80+
81+
# SageMath parsed files
82+
*.sage.py
83+
84+
# Environments
85+
.env
86+
.venv
87+
env/
88+
venv/
89+
ENV/
90+
env.bak/
91+
venv.bak/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/
105+
106+
# cython generated cpp
107+
mmdet/ops/nms/src/soft_nms_cpu.cpp
108+
mmdet/version.py
109+
data
110+
.vscode
111+
.idea
112+
113+
# custom
114+
*.pkl
115+
*.pkl.json
116+
*.log.json
117+
work_dirs/
118+
119+
# Pytorch
120+
*.pth

.isort.cfg

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[isort]
2+
line_length = 79
3+
multi_line_output = 0
4+
known_first_party = mmdet
5+
known_third_party = mmcv,numpy,matplotlib,pycocotools,six,seaborn,terminaltables,torch,torchvision
6+
no_lines_before = STDLIB,LOCALFOLDER
7+
default_section = THIRDPARTY

.style.yapf

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[style]
2+
BASED_ON_STYLE = pep8
3+
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true
4+
SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true

.travis.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
dist: xenial
2+
language: python
3+
4+
install:
5+
- pip install isort flake8 yapf
6+
7+
python:
8+
- "3.5"
9+
- "3.6"
10+
- "3.7"
11+
12+
script:
13+
- flake8
14+
- isort -rc --check-only --diff mmdet/ tools/
15+
- yapf -r -d --style .style.yapf mmdet/ tools/

INSTALL.md

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
## Installation
2+
3+
### Requirements
4+
5+
- Linux (Windows is not officially supported)
6+
- Python 3.5+ (Python 2 is not supported)
7+
- PyTorch 1.1 or higher
8+
- CUDA 9.0 or higher
9+
- NCCL 2
10+
- GCC 4.9 or higher
11+
- [mmcv](https://github.com/open-mmlab/mmcv) with version number 0.2.13 or 0.2.14
12+
13+
We have tested the following versions of OS and CUDA:
14+
15+
- OS: Ubuntu 16.04/18.04
16+
- CUDA: 10.0
17+
18+
19+
### Install mmdetection
20+
21+
a. Create a conda virtual environment and activate it.
22+
23+
```shell
24+
conda create -n ppdet python=3.7 -y
25+
conda activate ppdet
26+
```
27+
28+
b. Install PyTorch stable or nightly and torchvision following the [official instructions](https://pytorch.org/), e.g.,
29+
30+
```shell
31+
conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch
32+
```
33+
34+
c. Clone the PPDet repository.
35+
36+
```shell
37+
git clone https://github.com/nerminsamet/ppdet.git
38+
cd ppdet
39+
```
40+
d. Install mmcv
41+
42+
```shell
43+
pip install mmcv==0.2.13
44+
```
45+
46+
e. Install PPDet (other dependencies will be installed automatically).
47+
48+
```shell
49+
python setup.py develop
50+
# or "pip install -v -e ."
51+
```
52+
53+
Note:
54+
55+
1. The git commit id will be written to the version number with step e, e.g. 1.0.rc. The version will also be saved in trained models.
56+
It is recommended that you run step e each time you pull some updates from github. **If C/CUDA codes are modified, then step e is compulsory.**
57+
58+
2. Following the above instructions, PPDet is installed on `dev` mode, **any local modifications made to the code will take effect without the need to reinstall it** (unless you submit some commits and want to update the version number).
59+
60+
61+
### Prepare datasets
62+
63+
It is recommended to symlink the dataset root to `$PPDet/data`.
64+
If your folder structure is different, you may need to change the corresponding paths in config files.
65+
66+
```
67+
COCO_DIR
68+
├── annotations
69+
├── images
70+
│ ├── train2017
71+
│ ├── val2017
72+
│ ├── test2017
73+
```
74+
75+
76+
### Scripts
77+
78+
[Here](https://gist.github.com/hellock/bf23cd7348c727d69d48682cb6909047) is
79+
a script for setting up mmdetection with conda.
80+
81+
### Multiple versions
82+
83+
If there are more than one mmdetection on your machine, and you want to use them alternatively, the recommended way is to create multiple conda environments and use different environments for different versions.
84+
85+
Another way is to insert the following code to the main scripts (`train.py`, `test.py` or any other scripts you run)
86+
```python
87+
import os.path as osp
88+
import sys
89+
sys.path.insert(0, osp.join(osp.dirname(osp.abspath(__file__)), '../'))
90+
```
91+
or run the following command in the terminal of corresponding folder.
92+
```shell
93+
export PYTHONPATH=`pwd`:$PYTHONPATH
94+
```

0 commit comments

Comments
 (0)