Giter VIP home page Giter VIP logo

hw3's Introduction

hw3 - Instance Segmentation

environment

  • ubuntu 18.04
  • pytorch

data

  • tiny PASCAL VOC dataset
  • contains only 1,349 training images, 100 test images with 20 common object classes

train on custom dataset

  • first modify the data/config.py. Create a definition for your dataset. if you don't have validation data, use the same path to training_inages for path_to_validation_images.

    In train.py --parser.add_argument('--validation_size', default=200, type=int, help='The number of images to use for validation.') will use the first 200 images for validation.

my_custom_dataset = dataset_base.copy({
    'name': 'My Dataset',

    'train_images': 'path_to_training_images',
    'train_info':   'path_to_training_annotation',

    'valid_images': 'path_to_validation_images',
    'valid_info':   'path_to_validation_annotation',

    'has_gt': True,
    'class_names': ('my_class_id_1', 'my_class_id_2', 'my_class_id_3', ...)
})
  • then turn yolact_base_config = 'dataset' to yolact_base_config = 'my_custom_dataset'

training

  • add --parser.add_argument('--config', defalut=yolact_base_config)
  • you can choose learning rate for SGD, batchsize, epoch...
  • run python3 train.py to train your model.

eval

  • run python3 eval.py to get image with mask and bounding box on detected item.

  • you can choose weight, score_threshold, number of item.

  • add the test images to data/test_images and output will in data/output

  • example:

    image

  • you will get output images and one json file.

json file

  • run python3 tococojson.py it can turn the original json file into coco style format.

reference

hw3's People

Contributors

shenhsinyu avatar

Watchers

 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.