Skip to content
This repository was archived by the owner on Aug 20, 2023. It is now read-only.

nelson870708/VRDL-HW3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VRDL HW3

This is homework 3 in NCTU Selected Topics in Visual Recognition using Deep Learning.

Hardware

The following specs were used to create the original solution.

  • Ubuntu 18.04 LTS
  • Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
  • NVIDIA RTX 2070

Installation

  1. Using Anaconda is strongly recommended. {envs_name} is the new environment name which you should assign.
conda create -n {envs_name} python=3.7
conda activate {envs_name}
  1. Follow INSTALL.md to install detectron2.

  2. Use the following command to install other requirements.

pip install -r requirement.txt

Dataset Preparation

You can download the data here. The label is in pascal format and is a json file, called "pascal_train.json".

Prepare Data and Code

After downloading and extracting, the data directory is structured as:

+- data
  +- train_images
    +- 2007_000033.jpg
    +- 2007_000042.jpg
    ...
  +- test_images
    +- 2007_000629.jpg
    +- 2007_001175.jpg
    ...
  pascal_train.json
  test.json
train.py
utils.py
cocosplit.py
make_submission.py

Data Preprocessing

The following command is going to split the training data randomly by marking training data and validation data in two json files, called "train.json" and "val.json", respectively. The ratio of the training data and validation data is 8 : 2.

python3 cocosplit.py --having-annotations -s 0.8 ./data/pascal_train.json ./data/train.json ./data/val.json

You can also using the following command for help.

python3 cocosplit.py -h

The code is modified from here.

Training

The code not only trains, but also valid the model. You can train the model by following:

python3 train.py

Testing

python3 make_submission.py

Thanks for

facebookresearch: detectron2

akarazniewicz: cocosplit

About

NCTU Selected Topics in Visual Recognition using Deep Learning Homework 3. Object segmentation with Detectron2.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages