This project aims at performing automated identification of cell boundaries from the pathological video data. We are given the video file cells.avi as input. The problem statement can be found here.

The input video file:


  • This code has been tested on Ubuntu 16.04 LTS and Windows 10
  • Dependencies - Python 2.7 & 3.5, OpenCV 3.0+

Methods Used

  • Image Processing followed by Contours
  • Adaptive Thresholding
  • Watershed Algorithm
  • Structured Forest Algorithm


First clone the repository by typing: git clone

Structured Forest

  • First execute python to save the frames for structured forest.
  • Next execute python to apply the edge detection.
  • Finally, execute python to write the outputs to a video file.


  • The video edge.avi is the result after applying Structured Forest algorithm. Other outputs can be found in the Outputs folder.
  • Outputs of all methods can be seen at once in this video.

The output video file:

We include a few output screenshots here:

Output image 1 Output image 2 Output image 3 Output image 4
These are a few output screenshots


Our Structured Forest is an implementation of Artanis CV Structured Forest.

Future work

  • U-net convolutional neural network can be used.

  • Implementing the algorithm given in this paper.


This software is published for academic and non-commerical use only.

Leave a Comment