diff --git a/README.md b/README.md index e6d39ef..0ac2976 100644 --- a/README.md +++ b/README.md @@ -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 @@ -64,8 +66,7 @@ Lighthead-RCNN-Pytorch ├── data │ ├── coco2014 │ │ ├── annotations -│ │ ├── train2014 -│ │ ├── val2014 +│ │ ├── images ├── work_space │ ├── model │ ├── log @@ -73,7 +74,19 @@ Lighthead-RCNN-Pytorch │ ├── 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/). diff --git a/requirements.txt b/requirements.txt index d111067..59644da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/scripts/download_coco_data.sh b/scripts/download_coco_data.sh new file mode 100755 index 0000000..4df2b83 --- /dev/null +++ b/scripts/download_coco_data.sh @@ -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 diff --git a/utils/dataset.py b/utils/dataset.py index 422d9b7..9d94e87 100644 --- a/utils/dataset.py +++ b/utils/dataset.py @@ -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)