NYCU_VRDL_HW3

This is the repo for HW3 of Vision Recognition with Deep Learing in NYCU

We do instance segmentation on nucleus dataset

Ground Truth vs Prediction

training result visualized


training result visualized

References

Requirements

  • detectron2 (follow Installation Guide, install opencv to enable visualization)
  • python >= 3.6
  • pytorch >= 1.8
  • make
  • unzip
  • opencv (optional, only for visualization)

Setup

  1. Install dependencies
make install
  1. Download dataset and process the mask files
make getdataset
make preprocess_mask

Train

make train

Checkpoints and training log will be saved in output/ folder

Reproduce

make reproduce

The result will be saved in output/run_name/answer.json

Custom Usage

python train.py [options]

Options:

  • --resume resume training
  • --outdir "your_path" specify output directory
  • --eval evaluation mode (not training), default behaviour will save answer.json to --outdir
  • --model_path "your_path" specify path to checkpoint model for evaluation (only take effect when --eval is set)
  • --visualize visualize the evaluation result instead of saving json file (only take effect when --eval is set)