Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nerminsamet committed Aug 2, 2020
0 parents commit cfe9d8e
Show file tree
Hide file tree
Showing 206 changed files with 23,299 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/error-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Error report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

Thanks for your error report and we appreciate it a lot.

**Checklist**
1. I have searched related issues but cannot get the expected help.
2. The bug has not been fixed in the latest version.

**Describe the bug**
A clear and concise description of what the bug is.

**Reproduction**
1. What command or script did you run?
```
A placeholder for the command.
```
2. Did you make any modifications on the code or config? Did you understand what you have modified?
3. What dataset did you use?

**Environment**
- OS: [e.g., Ubuntu 16.04.6]
- GCC [e.g., 5.4.0]
- PyTorch version [e.g., 1.1.0]
- How you installed PyTorch [e.g., pip, conda, source]
- GPU model [e.g., 1080Ti, V100]
- CUDA and CUDNN version
- [optional] Other information that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)

**Error traceback**
If applicable, paste the error trackback here.
```
A placeholder for trackback.
```

**Bug fix**
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 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Describe the feature**

**Motivation**
A clear and concise description of the motivation of the feature.
Ex1. It is inconvenient when [....].
Ex2. There is a recent paper [....], which is very helpful for [....].

**Related resources**
If there is an official code release or third-party implementations, please also provide the information here, which would be very helpful.

**Additional context**
Add any other context or screenshots about the feature request here.
If you would like to implement the feature and create a PR, please leave a comment here and that would be much appreciated.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/general_questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: General questions
about: Ask general questions to get help
title: ''
labels: ''
assignees: ''

---


120 changes: 120 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# 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
mmdet/ops/nms/src/soft_nms_cpu.cpp
mmdet/version.py
data
.vscode
.idea

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

# Pytorch
*.pth
7 changes: 7 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[isort]
line_length = 79
multi_line_output = 0
known_first_party = mmdet
known_third_party = mmcv,numpy,matplotlib,pycocotools,six,seaborn,terminaltables,torch,torchvision
no_lines_before = STDLIB,LOCALFOLDER
default_section = THIRDPARTY
4 changes: 4 additions & 0 deletions .style.yapf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[style]
BASED_ON_STYLE = pep8
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true
SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dist: xenial
language: python

install:
- pip install isort flake8 yapf

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

script:
- flake8
- isort -rc --check-only --diff mmdet/ tools/
- yapf -r -d --style .style.yapf mmdet/ tools/
94 changes: 94 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
## Installation

### Requirements

- Linux (Windows is not officially supported)
- Python 3.5+ (Python 2 is not supported)
- PyTorch 1.1 or higher
- CUDA 9.0 or higher
- NCCL 2
- GCC 4.9 or higher
- [mmcv](https://github.com/open-mmlab/mmcv) with version number 0.2.13 or 0.2.14

We have tested the following versions of OS and CUDA:

- OS: Ubuntu 16.04/18.04
- CUDA: 10.0


### Install mmdetection

a. Create a conda virtual environment and activate it.

```shell
conda create -n ppdet python=3.7 -y
conda activate ppdet
```

b. Install PyTorch stable or nightly and torchvision following the [official instructions](https://pytorch.org/), e.g.,

```shell
conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch
```

c. Clone the PPDet repository.

```shell
git clone https://github.com/nerminsamet/ppdet.git
cd ppdet
```
d. Install mmcv

```shell
pip install mmcv==0.2.13
```

e. Install PPDet (other dependencies will be installed automatically).

```shell
python setup.py develop
# or "pip install -v -e ."
```

Note:

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.
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.**

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).


### Prepare datasets

It is recommended to symlink the dataset root to `$PPDet/data`.
If your folder structure is different, you may need to change the corresponding paths in config files.

```
COCO_DIR
├── annotations
├── images
│ ├── train2017
│ ├── val2017
│ ├── test2017
```


### Scripts

[Here](https://gist.github.com/hellock/bf23cd7348c727d69d48682cb6909047) is
a script for setting up mmdetection with conda.

### Multiple versions

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.

Another way is to insert the following code to the main scripts (`train.py`, `test.py` or any other scripts you run)
```python
import os.path as osp
import sys
sys.path.insert(0, osp.join(osp.dirname(osp.abspath(__file__)), '../'))
```
or run the following command in the terminal of corresponding folder.
```shell
export PYTHONPATH=`pwd`:$PYTHONPATH
```
Loading

0 comments on commit cfe9d8e

Please sign in to comment.