Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ I have only trained it with 18 epochs instead of 30 epochs in the original paper

2. #### Prepare COCO dataset.

It is recommended to symlink the dataset root to `$Lighthead-RCNN-Pytorch/data`.
- It is recommended to symlink the dataset root to `$Lighthead-RCNN-Pytorch/data`.

3. #### Create following folders and download the [pretrained model](https://drive.google.com/file/d/10Ku_G2FABjtEjWp3XWVmuguPkpbaTGV4/view?usp=sharing) to work_space/final
- Create following folders and download the [pretrained model](https://drive.google.com/file/d/10Ku_G2FABjtEjWp3XWVmuguPkpbaTGV4/view?usp=sharing) to work_space/final

- From the main Lighthead-RCNN-in-Pytorch0.4.1 directory run the script [download_coco_data.sh](scripts/download_coco_data.sh) to download and extract the coco dataset.

```shell
Lighthead-RCNN-Pytorch
Expand All @@ -64,16 +66,27 @@ Lighthead-RCNN-Pytorch
├── data
│ ├── coco2014
│ │ ├── annotations
│ │ ├── train2014
│ │ ├── val2014
│ │ ├── images
├── work_space
│ ├── model
│ ├── log
│ ├── final
│ ├── save
```


### Installation
- Following configurations are tested
- Ubuntu 16.04 LTS
- Python 3.6 (Conda Environment has been used)
- Cuda 9.0
- GCC 5 (GCC 6 does not work)
- GPU Tesla K80

- What will not work?
- I tried Python3.5, Python3.7 and Python2.7. None of these python versions worked for me.
- GCC 6 (On Debian, GCC 5 is not officially supported. So you may need to shift to Ubuntu. There will be workaround though that I didn't explore)


1. Install PyTorch 0.4.1 and torchvision following the [official instructions](https://pytorch.org/).

Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
numpy
opencv-python
Cython==0.29
torchvision==0.2.1
setuptools==20.7.0
numpy==1.11.0
six==1.10.0
Cython==0.29
Pillow==5.3.0
chainer==5.0.0
chainercv==0.11.0
matplotlib==3.0.2
model==0.6.0
pycocotools==2.0.0
tensorboardX==1.4
torch==0.4.1.post2
Expand Down
34 changes: 34 additions & 0 deletions scripts/download_coco_data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
cd data
mkdir coco2014
cd coco2014
mkdir images
cd images

wget http://images.cocodataset.org/zips/train2014.zip
wget http://images.cocodataset.org/zips/val2014.zip
wget http://images.cocodataset.org/zips/train2017.zip
wget http://images.cocodataset.org/zips/val2017.zip

unzip train2014.zip
unzip val2014.zip
unzip train2017.zip
unzip val2017.zip

rm train2014.zip
rm val2014.zip
rm train2017.zip
rm val2017.zip

cd ../
wget http://images.cocodataset.org/annotations/annotations_trainval2014.zip
wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip
wget https://dl.fbaipublicfiles.com/detectron/coco/coco_annotations_minival.tgz

unzip annotations_trainval2014.zip
unzip annotations_trainval2017.zip
tar -xvf coco_annotations_minival.tgz

cd ../
rm annotations_trainval2014.zip
rm annotations_trainval2017.zip
rm coco_annotations_minival.tgz
3 changes: 2 additions & 1 deletion utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def __init__(self, conf, mode = 'train'):
else:
self.training = False
self.orig_dataset = COCOBboxDataset(data_dir=conf.coco_path,
split='minival',
split='minival',
year='2014',
use_crowded=True,
return_crowded=True,
return_area=True)
Expand Down