Question: 1 . 1 Objective The objective of this assignment is to design an algorithm that segments lesions from healthy skin regions automatically. For developing the
Objective
The objective of this assignment is to design an algorithm that segments lesions from healthy skin
regions automatically. For developing the segmentation algorithm, you are given a set of
dermoscopic images and their corresponding ground truth. Figure shows lesion image samples and
segmentations.
Figure : Skin lesion image top and its ground truth segmentation bottomVisualization: White
represents lesion area, and black represent healthy skin ares background
Guidelines
Partial collaboration policy applies. You can lightly discuss these questions with your course
mates when you are working on the assignment but you need to declare with whom you had
discussed with as responsible collaborators. Include a statement at the end of the report to indicate
the nature of your collaboration.
In regards to the objective of this assignment, you are NOT allowed to use thirdparty packages to
assist you in this problem including deep learning models Packages 'pip'ed from Python
Package Index PyPI are acceptable.
You can use Spyder which comes with iPython console but you can use your own favourite IDE
or opt for the basic text editor and command line.
TDS VISUAL INFORMATION PROCESSING TRI.
Scripts and Functions
Codes to Write
Your working function segmentImage that you need to write is contained within
'imageSegment.py def
segmentImage img: # write
your code here return
outputImg
The inputs and output of the segmentImage function are as specified follows: inputImg
: Input image, a D numpy array of rowcol in BGR format outputImg : A D numpy array
segmentation mask where the lesions are represented with the
following intensity values:
Segment Background Lesion
Intensity
No visualization codes or functions are provided. You can write your own in a separate script for
purpose of visualizing the outputs or to generate nice figureplots for reporting.
Evaluation Functions
An evaluation function is provided to test your algorithm:
evaluateSegment.py:
Evaluate the Adapted Rand Error
pixel wise precision and recall, and the Intersection over Union
IoU between a set of output segmentation with the corresponding ground truth segmentation. It also
returns the average evaluations for the image set.
ArgandaCarreras, Ignacio, et al "Crowdsourcing the creation of image segmentation algorithms for connectomics."
Frontiers in neuroanatomy :
The functions are runnable on Anaconda Prompt or standard commandline prompt if necessary path
settings have been configured You can use the h switch to get further help on how to use these
functions, and what other options are there.
NOTE: You are NOT ALLOWED to change the code of this function except changing the Default
Parameters, which include the image directories, number of images in the directory, and
verbose to select the evaluation output.
TDS VISUAL INFORMATION PROCESSING TRI.
Package Requirement
The vanilla Anaconda installation does not come with the PrettyTable package. Please install
via pip at Anaconda Prompt.
pip install prettytable
Example of Usages
These commands shows evaluation of all images and specific lesions respectively:
python evaluateSegment.py v
python evaluateSegment.py p
This command segments and evaluates the whole image set in the directories specified under the
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
