Giter Site home page Giter Site logo

xiaolong-yun / instance-segmentation-with-discriminative-loss-tensorflow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hq-jiang/instance-segmentation-with-discriminative-loss-tensorflow

0.0 1.0 0.0 14.93 MB

Tensorflow implementation of "Semantic Instance Segmentation with a Discriminative Loss Function"

License: MIT License

Python 100.00%

instance-segmentation-with-discriminative-loss-tensorflow's Introduction

Instance Segmentation with a Discriminative Loss Function

Tensorflow implementation of Semantic Instance Segmentation with a Discriminative Loss Function trained on the TuSimple dataset


Files

├── data here the data should be stored
│        └── tusimple_dataset_processing.py processes the TuSimple dataset
├── doc documentation
├── inference_test inference related data
│        └── images for testing the inference
├── trained_model pretrained model for finetuning
├── clustering.py mean-shift clustering
├── datagenerator.py feeds data for training and evaluation
├── enet.py Enet architecture
├── inference.py tests inference on images
├── loss.py defines discriminative loss function
├── README.md
├── training.py contains training pipeline
├── utils.py contains utilities files for building and initializing the graph
└── visualization.py contains visualization of the clustering and pixel embeddings

Instructions

Inference

  1. To test the inference of the trained model execute:
    python inference.py --modeldir trained_model --outdir inference_test/results

Training

  1. Download the TuSimple training dataset and extract its contents to the data folder. The folder structure should look like this:
    | data
    ├── train_set
    │     ├── clips
    │     ├── label_data_0313.json
    │     ├── label_data_0531.json
    │     ├── label_data_0601.json
    │     └── readme.md
  2. Run the following script to prepare images and labels.
    python data/tusimple_dataset_processing.py <train_data_dir>
    This should create the following images and labels folders:
    | data
    ├── train_set
    ├── images
    └── labels
  3. For training on the dataset execute:
    python training.py
    alternatively use optional parameters (default parameters in this example):
    python training --srcdir data --modeldir pretrained_semantic_model --outdir saved_model --logdir log --epochs 50 --var 1.0 --dist 1.0 --reg 1.0 --dvar 0.5 --ddist 1.5
  4. To test the trained network execute: python inference.py --modeldir saved_model

Training Pipeline

Training Visualization

Feature space projection of one image for consecutive gradient steps. Each point represents one pixel embedding and each color represents an instance in the label.

Results

Todo

  • pip requirements
  • semantic segmentation code
  • visualization

Tensorflow version 1.2

Reference and Credits

This application uses Open Source components. We acknowledge and are grateful to these developers for their contributions to open source:

Related work

instance-segmentation-with-discriminative-loss-tensorflow's People

Contributors

hq-jiang avatar

Watchers

James Cloos 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.