Commit 16d8dda7 authored by Yizhou Wang's avatar Yizhou Wang
Browse files

initial files

parent 81df4598
......@@ -2,4 +2,7 @@ __pycache__/
*.egg-info/
data/
checkpoints/
results/
tmp/
.idea/
# RODNet: Radar Object Detection using Cross-Modal Supervision
## Installation
Create a conda environment for RODNet.
```
conda create -n rodnet python=3.8 -y
conda activate rodnet
```
Install pytorch.
```
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
```
Setup RODNet package.
```
pip install -e .
```
## Prepare data for RODNet
```
python tools/prepare_dataset/prepare_data.py \
--config configs/<CONFIG_FILE> \
--data_root <DATASET_ROOT> \
--split train,test \
--out_data_dir data/<DATA_FOLDER_NAME>
```
## Train models
```
python tools/train.py --config configs/<CONFIG_FILE> \
--data_dir data/<DATA_FOLDER_NAME> \
--log_dir checkpoints/
```
## Inference
```
python tools/test.py --config configs/<CONFIG_FILE> \
--data_dir data/<DATA_FOLDER_NAME> \
--checkpoint <CHECKPOINT_PATH> \
--res_dir results/
```
import os
from setuptools import setup, find_packages
import torch
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
os.environ['CFLAGS'] = '-Wno-deprecated-declarations' # suppress warnings in debug mode
def readme():
with open('README.md', encoding='utf-8') as f:
content = f.read()
return content
def get_requirements(filename='requirements.txt'):
here = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(here, filename), 'r') as f:
requires = [line.replace('\n', '') for line in f.readlines()]
return requires
def make_cuda_ext(name, module, sources):
define_macros = []
if torch.cuda.is_available() or os.getenv('FORCE_CUDA', '0') == '1':
define_macros += [('WITH_CUDA', None)]
else:
raise EnvironmentError('CUDA is required to compile RODNet!')
return CUDAExtension(
name='{}.{}'.format(module, name),
sources=[os.path.join(*module.split('.'), p) for p in sources],
define_macros=define_macros,
extra_compile_args={
'cxx': [],
'nvcc': [
'-D__CUDA_NO_HALF_OPERATORS__',
'-D__CUDA_NO_HALF_CONVERSIONS__',
'-D__CUDA_NO_HALF2_OPERATORS__',
]
})
if __name__ == '__main__':
setup(
name='rodnet',
version='1.0',
description='RODNet: Object Detection from Radar Data',
long_description=readme(),
long_description_content_type='text/markdown',
url='https://github.com/yizhou-wang/RODNet',
author='Yizhou Wang',
author_email='ywang26@uw.edu',
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 3 - Alpha',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
# Pick your license as you wish
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
# These classifiers are *not* checked by 'pip install'. See instead
# 'python_requires' below.
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
keywords='rodnet, object detection, radar, autonomous driving',
packages=find_packages(include=["rodnet.*"]),
python_requires='>=3.6',
install_requires=get_requirements(),
zip_safe=False
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment