Git Product home page Git Product logo

cot_sem_tf's Introduction

Complement Objective Training

Overview

This repository contains the TensorFlow implementation of Complement Objective Training introduced in the following paper:

COMPLEMENT OBJECTIVE TRAINING.
Hao-Yun Chen, Pei-Hsin Wang, Chun-Hao Liu, Shih-Chieh Chang, Jia-Yu Pan, Yu-Ting Chen, Wei Wei, Da-Cheng Juan.
https://openreview.net/forum?id=HyM7AiA5YX

Dependencies

  • Python 3.5
  • tensorflow 1.13.2
  • Pillow

Please find details dependency in requirements.txt

Usage

Data Preparation & Pre-processing

To prepare dataset, please find the folder structure below:

<path to data dir>
├── test
└── train
    ├── 14
    │   ├── test_14_Left.tif
    │   ├── test_14_Right.tif
    │   └── test_14_Top.tif
    ├── 255
    │   ├── test_255__left.tiff
    │   ├── test_255_right.tiff
    │   └── test_255_top.tiff
    ├── <label id in int>
    │   ├── <images of label id>.tiff
    │   ├  ..........
    ├   ...........
    ├── 37
    │   ├── test_37_left.tiff
    │   ├── test_37_right.tiff
    │   └── test_37_top.tiff
    └── 76
        ├── test_76_left.tif
        ├── test_76_right.tif
        └── test_76_top.tif

To convert dataset into tfrecords please find the following commands:

    python sem_to_tfrecord.py \
      --raw_data_dir=${DATA_DIR}

Run

For getting baseline results

    python main.py \
      --data_dir=${DATA_DIR} \
      --model_dir=${TRAIN_DIR} \
      --train_epochs=200 \
      --epochs_per_eval=10 \
      --batch_size=128 \
      --resnet_size=101

For training via Complement objective

    python main.py \
      --data_dir=${DATA_DIR} \
      --model_dir=${TRAIN_DIR} \
      --train_epochs=200 \
      --epochs_per_eval=10 \
      --batch_size=128 \
      --COT \
      --resnet_size=101

Please find the detail runscript under run.bash

Benchmark on CIFAR10

The following table shows the best test accuracy in a 200-epoch training session.

Model Baseline COT
ResNet-110 93.49% 93.68%

Acknowledgement

The CIFAR-10 reimplementation of COT is adapted from the tensorflow/models repository by tensorflow.

cot_sem_tf's People

Contributors

stevenokm 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.