PlumedSerpent / ASM_pytorch

An unofficial PyTorch implementation of ASM: Adversarial Structure Matching for Structured Prediction Tasks in CVPR2019.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pytorch implementation for Adversarial Structure Matching for Structured Prediction Tasks

Pytorch implementation of : Adversarial Structure Matching for Structured Prediction Tasks. Due to my limited time and computation resources, I only perform several toy experiments on the Weizmann horse figure ground segmentation task.

Table of Contents

Introduction

ASM (Adversarial Structure Matching for Structured Prediction Tasks) is a new framework for structured prediction task which is proposed by Jyh-Jing Hwang et al, in CVPR2019.

ASM trains a structure analyzer that provides the supervisory signals, the ASM loss. The structure analyzer is trained to maximize the ASM loss, or to emphasize recurring multi- scale hard negative structural mistakes among co-occurring patterns. On the contrary, the structured prediction network is trained to reduce those mistakes and is thus enabled to distinguish fine-grained structures. As a result, training structured prediction networks using ASM reduces contextual confusion among objects and improves boundary localization.

Results Visualization in Paper

Dependencies

  • Python3
  • torch
  • torchvision
  • numpy
  • opencv
  • Pillow
  • progress

Usage

For training with only Structured Prediction Net and IID loss (in this project , BCE loss):

$ python main.py 
# Prints out the standard-readme spec

Generator

To use the generator, look at generator-standard-readme. There is a global executable to run the generator in that package, aliased as standard-readme.

Badge

If your README is compliant with Standard-Readme and you're on GitHub, it would be great if you could add the badge. This allows people to link back to this Spec, and helps adoption of the README. The badge is not required.

standard-readme compliant

To add in Markdown format, use this code:

[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

Example Readmes

To see how the specification has been applied, see the example-readmes.

Related Efforts

Maintainers

@RichardLitt.

Contributing

Feel free to dive in! Open an issue or submit PRs.

Standard Readme follows the Contributor Covenant Code of Conduct.

License

MIT © Wang Jian

About

An unofficial PyTorch implementation of ASM: Adversarial Structure Matching for Structured Prediction Tasks in CVPR2019.

License:MIT License