From 3ccd7ac35a77780a21256b143434ca59544cd322 Mon Sep 17 00:00:00 2001 From: Muhammad Maaz Date: Sat, 9 May 2020 15:33:37 +0500 Subject: [PATCH 1/7] Minor fix --- utils/dataset.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) From 8cd322c84fa22a7ceafa523de17eeefcf4821842 Mon Sep 17 00:00:00 2001 From: Muhammad Maaz Date: Sat, 9 May 2020 16:15:32 +0500 Subject: [PATCH 2/7] Adds bash script to download the dataset and writes instrutions to do so in README --- README.md | 3 +++ scripts/download_coco_data.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 scripts/download_coco_data.sh diff --git a/README.md b/README.md index e6d39ef..799eccb 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,8 @@ I have only trained it with 18 epochs instead of 30 epochs in the original paper 3. #### Create following folders and download the [pretrained model](https://drive.google.com/file/d/10Ku_G2FABjtEjWp3XWVmuguPkpbaTGV4/view?usp=sharing) to work_space/final +4. 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 ├── functions @@ -73,6 +75,7 @@ Lighthead-RCNN-Pytorch │ ├── save ``` + ### Installation 1. Install PyTorch 0.4.1 and torchvision following the [official instructions](https://pytorch.org/). 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 From 1be1e4ba39ade3849db3068a3406f30b00060a6d Mon Sep 17 00:00:00 2001 From: Muhammad Maaz Date: Sat, 9 May 2020 17:03:20 +0500 Subject: [PATCH 3/7] Updates requrirement.txt --- requirements.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index d111067..8a7b689 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,12 @@ +numpy +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 From 25b674f2a9fa3dbba2d0b24e48d4a9b276ddbe2a Mon Sep 17 00:00:00 2001 From: Muhammad Maaz Date: Sat, 9 May 2020 17:33:43 +0500 Subject: [PATCH 4/7] Updates README --- README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 799eccb..e7470fa 100644 --- a/README.md +++ b/README.md @@ -52,11 +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`. +1. 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 +2. Create following folders and download the [pretrained model](https://drive.google.com/file/d/10Ku_G2FABjtEjWp3XWVmuguPkpbaTGV4/view?usp=sharing) to work_space/final -4. 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. +3. 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 @@ -66,8 +66,7 @@ Lighthead-RCNN-Pytorch ├── data │ ├── coco2014 │ │ ├── annotations -│ │ ├── train2014 -│ │ ├── val2014 +│ │ ├── images ├── work_space │ ├── model │ ├── log @@ -77,6 +76,16 @@ Lighthead-RCNN-Pytorch ### 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) + +- 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/). From e5582f2ddd3f455ff993a18e561af2005dea6cb0 Mon Sep 17 00:00:00 2001 From: Muhammad Maaz Date: Sat, 9 May 2020 17:34:54 +0500 Subject: [PATCH 5/7] Updates reqirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 8a7b689..59644da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ numpy +opencv-python Cython==0.29 torchvision==0.2.1 setuptools==20.7.0 From eaa0b401dfaa5bec99ec8560945173ccf9ccee58 Mon Sep 17 00:00:00 2001 From: Muhammad Maaz Date: Sat, 9 May 2020 17:37:00 +0500 Subject: [PATCH 6/7] Updates README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e7470fa..3d62c68 100644 --- a/README.md +++ b/README.md @@ -52,11 +52,11 @@ I have only trained it with 18 epochs instead of 30 epochs in the original paper 2. #### Prepare COCO dataset. -1. 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`. -2. 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 -3. 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. +- 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 From 19f059c5217884375d7a7df034f241a0c75addce Mon Sep 17 00:00:00 2001 From: Muhammad Maaz Date: Sat, 9 May 2020 17:38:35 +0500 Subject: [PATCH 7/7] Updates README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3d62c68..0ac2976 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ Lighthead-RCNN-Pytorch - 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.