Skip to content

Image segmentation implemented using pytorch on a COCO format Dataset of Ingredients with various models including U-NET, U-NET++, SegNet and DeepLabV3+

Notifications You must be signed in to change notification settings

paulecraig79/Image_Segmentation_On_Domestic_Objects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image segmentation on domestic objects

Python PyTorch OpenCV Tensor Flow

This repository contains the python project for my honours project at Edinburgh Napier University. This code was used for testing and researching binary image segmentation using an ingredients dataset being developed by Edinburgh Napier University. The code uses four models :

  • U-Net
  • U-Net++ / Nested U-Net
  • SegNet
  • DeepLabV3+

The code uses COCO datasets, if another type of dataset was to be used then the code would need to be altered.

The code can be split up into 3 sections:

  • Data loading
  • Model Training
  • Model Predictions

Data loading

The code for the data loading is found in the data.py file. To access and use the COCO dataset, I used the python package pycoco which makes it easier to access images and annotations. Pycoco uses the annotations to generate masks for the segmentations. The images and masks are then loaded into a dataloader which can then be used by the models to train or predict.

Model Training

For training, each model is imported and initialised with in-channels and out-channels. The loss function which I have implemented for training is Binary Cross Entropy with logits loss and the optimzer which has been implemented is Adam. The validation dataset is used to track the models performance during training.

Model Predictions

The checkpoints which have been trained from model training are loaded into each model for predicting. The models will predict every image in the test dataset then output the average pixel accuracy, average precision, average recall, average F1-score, average time taken per image and total time taken.

About

Image segmentation implemented using pytorch on a COCO format Dataset of Ingredients with various models including U-NET, U-NET++, SegNet and DeepLabV3+

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages