Code Monkey home page Code Monkey logo

eiscue's Introduction

Eiscue - Object Detection for DSTA TIL 2020

Submission for the DSTA TIL 2020 AI Competition.

Object detection of Fashion Images using the Detectron2 framework.

Datasets

The following additional datasets were utilized in the training of our models:

Installation

To install Detectron2 and its dependencies, refer to the official installation instructions.

Config

Each training run is completely defined by customizable parameters in its configuration file, with a few templates already specified in the configs folder.

For example, all the existing config files train the models with pretrained COCO weights:

  • cascade_mask_rcnn.yaml: Cascade Mask R-CNN model with ResNet50 backbone.
  • faster_rcnn.yaml: Faster R-CNN model with ResNet50 backbone.
  • retinanet.yaml: RetinaNet model with ResNet50 backbone.

Other types of models and their respective configs and pretrained weights can be found in the official Detectron2 Model Zoo.

While you can refer to the config reference for a full list of available parameters and what they mean, I've annotated some of them in the existing configs, and some notable ones to customize are:

  • SOLVER.IMS_PER_BATCH: Batch size
  • SOLVER.BASE_LR: Base learning rate
  • SOLVER.STEPS: The iteration number to decrease learning rate by GAMMA
  • SOLVER.MAX_ITER: Total number of training iterations
  • SOLVER.CHECKPOINT_PERIOD: Saves checkpoint every number of steps
  • INPUT.MIN_SIZE_TRAIN: Image input sizes
  • TEST.EVAL_PERIOD: The period (in terms of steps) to evaluate the model during training
  • OUTPUT_DIR: Specify output directory to save checkpoints, logs, results etc.

Training

To train on a single gpu:

python train_net.py \
    --config-file configs/cascade_mask_rcnn.yaml \
    OUTPUT_DIR output/cascade  # Specify output directory to save weights, logs etc.

To train on multiple gpus:

python train_net.py \
    --num-gpus 4 \
    --config-file configs/cascade_mask_rcnn.yaml \
    OUTPUT_DIR output/cascade  # Specify output directory to save weights, logs etc.

To resume training from a checkpoint (finds last checkpoint from cfg.OUTPUT_DIR)

python train_net.py \
    --config-file config.yaml \  # Config file of halted run
    --resume

To see all other options:

python train_net.py -h

Evaluation

This command only runs evaluation on the test dataset:

python train_net.py \
    --eval-only \
    --config-file configs/cascade_mask_rcnn.yaml \  # Config file of trained model
    MODEL.WEIGHTS /path/to/checkpoint_file \  # Path to trained checkpoint
    OUTPUT_DIR output/eval  # Specify output directory to save results, predictions etc.

eiscue's People

Contributors

yizhe-ang avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.