🗺 General purpose U-Network implemented in Keras for image segmentation

Overview

TF-Unet

General purpose U-Network implemented in Keras for image segmentation

Getting startedTrainingEvaluation

Getting started

Looking for Jupyter notebooks? checkout the training, evaulation and prediction notebooks or run make jupyter to serve them locally. Looking for pre-trained weights? download them here.

Dependencies

To quickly get started make sure you have the following dependencies installed:

Setup

Clone (or download) the repository and cd into it

git clone https://github.com/juniorxsound/TF-Unet.git && cd TF-Unet

Next build the Docker image by simply running make build

The build process will pick either Dockerfile.cpu or Dockerfile.gpu based on your system

Training

This repository uses the ShapeDataset synthetic data generator written by Matterport (in Mask R-CNN). No download is needed, as all data is generated during runtime, here is a sample of the dataset

To start training, simply call make train which will start the training process using the parameters defined in train.py. A model will be saved at the end of the training process into the weights folder in SavedModel format.

If you are interested in following the training process, you can use make log during training to start a Tensorboard server with accuracy and loss metrics being updated every batch.

Tensorboard image here

If you want to train in a Jupyter notebook follow the Training notebook

Evaluation

To quickly evaluate download the pre-trained weights and unzip the contents into the weights folder. To run evaluation simply use make evaluate or the Jupyter Evaluation notebook.

The weights provided were trained for 50 epochs on 8000 samples with batch size of 18. Training takes 5 hours using 2 GTX 2080ti's and reaches 96.56% accuracy.

Prediction

See the Jupyter Prediction notebook.

Architecture

The implementation was inspired by U-Net: Convolutional Networks for Biomedical Image Segmentation

Thanks to

The original paper authors, this Keras UNet implementation, this Tensorflow UNet implementation and Mask R-CNN authors.

You might also like...
This source code is implemented using keras library based on "Automatic ocular artifacts removal in EEG using deep learning"

CSP_Deep_EEG This source code is implemented using keras library based on "Automatic ocular artifacts removal in EEG using deep learning" {https://www

This is an implementation of Googles Yogi-Optimizer in Keras (tf.keras)

Yogi-Optimizer_Keras This is an implementation of Googles Yogi-Optimizer in Keras (tf.keras) The NeurIPS-Paper can be found here: http://papers.nips.c

Keras udrl - Keras implementation of Upside Down Reinforcement Learning

keras_udrl Keras implementation of Upside Down Reinforcement Learning This is me

Example-custom-ml-block-keras - Custom Keras ML block example for Edge Impulse

Custom Keras ML block example for Edge Impulse This repository is an example on

Classification models 1D Zoo - Keras and TF.Keras

Classification models 1D Zoo - Keras and TF.Keras This repository contains 1D variants of popular CNN models for classification like ResNets, DenseNet

A keras-based real-time model for medical image segmentation (CFPNet-M)
A keras-based real-time model for medical image segmentation (CFPNet-M)

CFPNet-M: A Light-Weight Encoder-Decoder Based Network for Multimodal Biomedical Image Real-Time Segmentation This repository contains the implementat

Official implementation of "SinIR: Efficient General Image Manipulation with Single Image Reconstruction" (ICML 2021)

SinIR (Official Implementation) Requirements To install requirements: pip install -r requirements.txt We used Python 3.7.4 and f-strings which are in

A python-image-classification web application project, written in Python and served through the Flask Microframework. This Project implements the VGG16 covolutional neural network, through Keras and Tensorflow wrappers, to make predictions on uploaded images.
Worktory is a python library created with the single purpose of simplifying the inventory management of network automation scripts.

Worktory is a python library created with the single purpose of simplifying the inventory management of network automation scripts.

Comments
  • Cache docker image on CI so it runs faster 🏃🏿‍♀️

    Cache docker image on CI so it runs faster 🏃🏿‍♀️

    Is your feature request related to a problem? Please describe. Right now Travis is building the image every time there is a commit, regardless of whether the image itself changed or not. This takes almost 5 minutes where it could really be just using the :latest tag from the previous build

    Describe the solution you'd like Cache the :latest image build and only rebuild the layers that changed (if any).

    Additional context Some more context in this post

    enhancement 🏋🏾‍♀️ nice to have 🎁 
    opened by juniorxsound 0
Owner
Or Fleisher
Engineer & artist building computational photography / CG / ML / volumetric things. Staff R&D Engineer at @nytimes 💻 Prev. @vimeo @Volume-GL @ViacomInc @ITPNYU
Or Fleisher
Implementation of self-attention mechanisms for general purpose. Focused on computer vision modules. Ongoing repository.

Self-attention building blocks for computer vision applications in PyTorch Implementation of self attention mechanisms for computer vision in PyTorch

AI Summer 962 Dec 23, 2022
a general-purpose Transformer based vision backbone

Swin Transformer By Ze Liu*, Yutong Lin*, Yue Cao*, Han Hu*, Yixuan Wei, Zheng Zhang, Stephen Lin and Baining Guo. This repo is the official implement

Microsoft 9.9k Jan 8, 2023
BYOL for Audio: Self-Supervised Learning for General-Purpose Audio Representation

BYOL for Audio: Self-Supervised Learning for General-Purpose Audio Representation This is a demo implementation of BYOL for Audio (BYOL-A), a self-sup

NTT Communication Science Laboratories 160 Jan 4, 2023
A task-agnostic vision-language architecture as a step towards General Purpose Vision

Towards General Purpose Vision Systems By Tanmay Gupta, Amita Kamath, Aniruddha Kembhavi, and Derek Hoiem Overview Welcome to the official code base f

AI2 79 Dec 23, 2022
A general-purpose, flexible, and easy-to-use simulator alongside an OpenAI Gym trading environment for MetaTrader 5 trading platform (Approved by OpenAI Gym)

gym-mtsim: OpenAI Gym - MetaTrader 5 Simulator MtSim is a simulator for the MetaTrader 5 trading platform alongside an OpenAI Gym environment for rein

Mohammad Amin Haghpanah 184 Dec 31, 2022
Unofficial PyTorch implementation of MobileViT based on paper "MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer".

MobileViT RegNet Unofficial PyTorch implementation of MobileViT based on paper MOBILEVIT: LIGHT-WEIGHT, GENERAL-PURPOSE, AND MOBILE-FRIENDLY VISION TR

Hong-Jia Chen 91 Dec 2, 2022
General purpose GPU compute framework for cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends)

General purpose GPU compute framework for cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends). Blazing fast, mobile-enabled, asynchronous and optimized for advanced GPU data processing usecases. Backed by the Linux Foundation.

The Kompute Project 1k Jan 6, 2023
A general-purpose programming language, focused on simplicity, safety and stability.

The Rivet programming language A general-purpose programming language, focused on simplicity, safety and stability. Rivet's goal is to be a very power

The Rivet programming language 17 Dec 29, 2022
DFFNet: An IoT-perceptive Dual Feature Fusion Network for General Real-time Semantic Segmentation

DFFNet Paper DFFNet: An IoT-perceptive Dual Feature Fusion Network for General Real-time Semantic Segmentation. Xiangyan Tang, Wenxuan Tu, Keqiu Li, J

null 4 Sep 23, 2022