back to home

zhixuhao / unet

unet for image segmentation

4,907 stars
2,016 forks
210 issues
Jupyter NotebookPython

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing zhixuhao/unet in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/zhixuhao/unet)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Implementation of deep learning framework -- Unet, using Keras The architecture was inspired by U-Net: Convolutional Networks for Biomedical Image Segmentation. --- Overview Data The original dataset is from isbi challenge, and I've downloaded it and done the pre-processing. You can find it in folder data/membrane. Data augmentation The data for training contains 30 512*512 images, which are far not enough to feed a deep learning neural network. I use a module called ImageDataGenerator in keras.preprocessing.image to do data augmentation. See dataPrepare.ipynb and data.py for detail. Model This deep neural network is implemented with Keras functional API, which makes it extremely easy to experiment with different interesting architectures. Output from the network is a 512*512 which represents mask that should be learned. Sigmoid activation function makes sure that mask pixels are in \[0, 1\] range. Training The model is trained for 5 epochs. After 5 epochs, calculated accuracy is about 0.97. Loss function for the training is basically just a binary crossentropy. --- How to use Dependencies This tutorial depends on the following libraries: • Tensorflow • Keras >= 1.0 Also, this code should be compatible with Python versions 2.7-3.5. Run main.py You will see the predicted results of test image in data/membrane/test Or follow notebook trainUnet Results Use the trained model to do segmentation on test images, the result is statisfactory. About Keras Keras is a minimalist, highly modular neural networks library, written in Python and capable of running on top of either TensorFlow or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research. Use Keras if you need a deep learning library that: allows for easy and fast prototyping (through total modularity, minimalism, and extensibility). supports both convolutional networks and recurrent networks, as well as combinations of the two. supports arbitrary connectivity schemes (including multi-input and multi-output training). runs seamlessly on CPU and GPU. Read the documentation Keras.io Keras is compatible with: Python 2.7-3.5.