0% found this document useful (0 votes)
231 views62 pages

Genie User Guide - Digital Pathology

manual for genie classifier of Aperio Digital pathology solutions.

Uploaded by

nazargafar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
231 views62 pages

Genie User Guide - Digital Pathology

manual for genie classifier of Aperio Digital pathology solutions.

Uploaded by

nazargafar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Genie

Users Guide

Copyright2008AperioTechnologies,Inc.
PartNumber/Revision:MAN0098,RevisionA
Date:December9,2008
ThisdocumentappliestosoftwareversionsRelease10.0andlater.
Allrightsreserved.Thisdocumentmaynotbecopiedinwholeorinpartorreproducedinanyothermediawithoutthe
expresswrittenpermissionofAperioTechnologies,Inc.Pleasenotethatundercopyrightlaw,copyingincludestranslation
intoanotherlanguage.

User Resources
ForthelatestinformationonAperioTechnologiesproductsandservices,pleasevisittheAperioTechnologieswebsiteat:
http://www.aperio.com.

Disclaimers
ThismanualisnotasubstituteforthedetailedoperatortrainingprovidedbyAperioTechnologies,Inc.,orforother
advancedinstruction.AperioTechnologiesFieldRepresentativesshouldbecontactedimmediatelyforassistanceinthe
eventofanyinstrumentmalfunction.InstallationofhardwareshouldonlybeperformedbyacertifiedAperioTechnologies
ServiceEngineer.
ImageServerisintendedforusewiththeSVSfileformat(thenativeformatfordigitalslidescreatedbyscanningglassslides
withtheScanScopescanner).EducatorswilluseAperiosoftwaretoviewandmodifydigitalslidesinCompositeWebSlide
(CWS)format.
AperioproductsareFDAclearedforspecificclinicalapplications,andareintendedforresearchuseforotherapplications.

Trademarks and Patents


ScanScopeisaregisteredtrademarkandImageServer,TMALab,ImageScope,andSpectrumaretrademarksofAperio
Technologies,Inc.Allothertradenamesandtrademarksarethepropertyoftheirrespectiveholders.
AperioproductsareprotectedbyU.S.Patents:6,711,283;6,917,696;7,035,478;7,116,440;7,428,324;and7,457,446,and
licensedunderoneormoreofthefollowingU.S.Patents:6,101,265;6,272,235;6,522,774;6,775,402;6,396,941;6,674,881;
6,226,392;6,404,906;6,674,884;and6,466,690.

Contact Information
Headquarters: AperioTechnologies,Inc. EuropeanOffice: Aperio
1360ParkCenterDrive 3TheSanctuary
Vista,CA92081 EdenOfficePark
UnitedStates HamGreen
BristolBS200DD,UK

United States of America


Tel: 866-478-4111 (toll free)
Fax: 760-539-1116
Customer Service Tel: 866-478-4111 (toll free)
Technical Support Tel: 866-478-3999 (toll free)
Email: [email protected]
Europe
Tel: +44 (0) 1275 375123
Fax: +44(0) 1275 373501
Customer Service Tel: +44 (0) 1275 375123
Technical Support Tel: +44 (0) 1275 375123
Email: [email protected]

ii Genie Users Guide


Contents

CHAPTER 1 - INTRODUCTION TO GENIE ........................................................... 1


OriginsandBackground ...........................................................................................1
WhatCanGenieDoForYou? ..................................................................................2
Prerequisites ................................................................................................................2
SpectrumServer ......................................................................................................2
GenieClassifierDeveloper ....................................................................................2
GenieClassifierUser ..............................................................................................2
TheGenieWorkflow .................................................................................................3
DevelopingtheGenieClassifier............................................................................3
IntegrationwithOtherAperioProducts ................................................................5
SpectrumPlus..........................................................................................................5
ImageScope ..............................................................................................................5

CHAPTER 2 - NAVIGATING IN GENIE ............................................................... 7


LoggingintoSpectrum ..............................................................................................7
TheSpectrumMainWindow ...................................................................................8
TheAdministrativeMenu .....................................................................................9
OverviewofGeniePages..........................................................................................9
TipsforNavigatingtheGeniePages..................................................................11
ForMoreInformation ..............................................................................................11

CHAPTER 3 - WORKING WITH GENIE ............................................................. 13


StartSimple ...............................................................................................................13
TheMontage..............................................................................................................14
Training......................................................................................................................15
WhentoAddComplexity .......................................................................................16
AlgorithmMacros.....................................................................................................17

CHAPTER 4 - CREATING A GENIE CLASSIFIER ................................................... 19


Step#1CreateaGenieProject.............................................................................19
TipsonUsingtheProjectDetailsPage ..............................................................20
Step#2CreateaTrainingSet...............................................................................20
TipsonUsingTrainingSets.................................................................................22
Step#3AddSlidestotheTrainingSet..............................................................23
Step#4DefineClassesofTissue(CreateaTemplate)....................................26
TipsonCreatingTemplates.................................................................................27
CreatingaTemplateforUsewithMultipleTrainingSets ..............................28
Step#5MarkTrainingSamples..........................................................................29
Step#6CreatetheMontage .................................................................................30
Step#7CreatetheClassifier ................................................................................31
CreateaTrainingMacro ......................................................................................32
RuntheTrainingAnalysis ...................................................................................35
ViewingtheMontageRegionsinContext.........................................................38

Genie Users Guide iii


Contents

Step#8TesttheClassifier....................................................................................39
CreateaTestingRegion .......................................................................................39
CreateaClassificationMacro..............................................................................41
RuntheClassifierMacro......................................................................................45
ImprovingClassificationPerformance ..............................................................45
ExportingandImportingClassifiers ....................................................................46
ToExportaClassifier ...........................................................................................46
ToImportaClassifier...........................................................................................47
UsingtheClassifier..................................................................................................47
ResultsofUsingtheGenieClassifier .................................................................49

APPENDIX A - GENIE TRAINING AND CLASSIFIER ALGORITHM PARAMETERS ...............51


GenieTrainingAlgorithmParameters.................................................................51
IntroductiontoGenieTrainingArchitecture ....................................................52
GenieTrainingParameterDefinitions ...............................................................53
GenieTrainingAlgorithmOutputParameters.................................................54
GenieClassifierAlgorithmParameters ...............................................................54
GenieClassifierAlgorithmInputParameters ..................................................54

INDEX ...................................................................................................57

iv Genie Users Guide


1
Introduction to Genie

This chapter presents an overview of Genie, a major


enhancement to Aperios family of image analysis products.
Genie is an interactive tool that learns from analyzing
training slides, and then develops classifiers for locating
and automatically annotating regions of interest in a large
number of digital slides.

Origins and Background


AnacronymforGENeticImageryExploration,Geniewasdevelopedunderthe
nameGenieProatLosAlamosNationalLaboratories(LANL)foruseinsatellite
imagingapplications.FundedbytheDepartmentofEnergyandDepartmentof
Defense,GenieProhasbeenusedtoanalyzedamagecausedbynaturaldisasters
suchaswildfires,hurricanes,andearthquakes;totrackenvironmentalchanges,
andtomonitorcrophealth.ThefigurebelowshowsaNASAaerialphoto(left)
thathasbeenenhancedinGeniePro,makingitmucheasiertoanalyzethevisual
data.Bycolorcodinglayerscontainingtheareasofinterest(forestsinblue,
grasslandsingreen,scrubinyellowandbaregroundinred),GeniePro
streamlinesdataanalysis.


LANLrecognizedthevalueoftheGenieProtechnologytoawiderangeofnon
satelliteimagingapplications,includingremotesensing,aerialimagery,and
biomedicalimageryandsoughtpartnerswithexpertiseinthoseareas.LANL
grantedalicensetoAperiofordevelopmentofdigitalpathologyapplications.
AperiousestheshortenednameGenieforitsimplementationofthetechnology.

Genie Users Guide 1


Chapter 1 Introduction to Genie

What Can Genie Do For You?


ThechaptersthatfollowdiscusshowGenieworks,butwhatismostimportantis
whatGeniedoesforyou.BeforeGeniewasavailable,analyzingadigitalslide
meantmanuallydrawingannotationsontheslidetoidentifyareasofinterest(for
example,areascontainingtumorcells)andthenrunninganalgorithmtoanalyze
thoseareas.Giventhelargenumberofslidesthattypicallymakeupaproject,
thismanualannotationprocessinvolvedmanyhoursoftediouslaborandthe
possibilityofhumanerror.
NowwehaveintroducedGenieintotheprocess.AresearchertrainsGenieto
recognizesignificantstructures(suchastumorcells)tocreateaclassifier.The
GenieclassifierscanbeusedbyanyonewhoisusinganyAperioalgorithm
(Release10andlater)toanalyzeadigitalslide.Byselectingaclassifierwhen
usinganalgorithm,preprocessingisdonetoautomaticallyselectareasof
interestbeforethealgorithmperformsitsanalysis,improvingtheaccuracyofthe
resultsandsavingagreatdealoftimeforthealgorithmuser.

Prerequisites
ThissectiondiscussesGeniesprerequisites.

Spectrum Server
SpectrummustbelicensedforSpectrumPlusandGenie.
Genie_v1_vx.x.x.x.exemustbeinstalledontheDSR(theserveror
computersconnectedtotheserveronwhichAAFClientisinstalled).
AnyalgorithmsthatwillmakeuseofGenieclassifiersmustbeinstalled
ontheDSR(theserverorcomputersconnectedtotheserveronwhich
AAFClientisinstalled).

Genie Classifier Developer


ThepersonwhodevelopsGenieclassifiersmust:
BedefinedasaSpectrumuserwithauserrolethatpermitsuseofthe
GeniedatahierarchyandaccesstoGenieprojects,Genietrainingsets,
andGenietemplates.
HaveImageScopeinstalledonhisorherworkstation.
BecausethisuserneedstocreatenewGeniealgorithmmacros,
Genie_v1_vx.x.x.x.exemustbeinstalledonhisorherworkstation.(Any
otheralgorithmsthisusermayneedtocreatemacrosforalsoneedtobe
installedontheworkstation.)

Genie Classifier User


InordertouseGenieclassifierswhileanalyzingdigitalslides.theusermustbe
definedasaSpectrumuserwithauserrolethatpermitsalgorithmanalysis.The

2 Genie Users Guide


Chapter 1 - Introduction

usermustalsohaveImageScopeinstalledonhisorherworkstation.Thisuser
doesnotneedaccesstotheGeniedatahierarchy,projects,ortrainingsets.

The Genie Workflow


Genieispowerful,yetuserfriendly,andrequiresabsolutelynoprogramming
expertiseonthepartoftheuser.TheGenieworkflowusesSpectrumand
ImageScope.
ThetypicaluserwhodevelopsGenieclassifiersisapathologistorresearcher
whounderstandsthestructures,regionsofinterestandthenatureofthe
problemsthattheGenieclassifiersarecreatedtoidentifyorresolve.ThisGenie
usertrainsandfinetunesthetrainingmodulesiteratively,verifyingtheaccuracy
ofeachiteration,untilanalgorithmisdevelopedthatfindstheexpectedareas,
structures,andcellsofinterestmostcorrectly.TheGenieclassifieristhencreated
fromthetrainingalgorithm.
DevelopingGenieclassifiersisnotanactivitythattakesplaceonadailybasis.It
isprimarilyintendedtodevelopaclassifierforautomaticallyanalyzingand
catalogingasetofslides,basedonsimilaritiesanddistinguishingcharacteristics.
Eachtimeyouneedanewclassifiertoapplytoadifferenttypeorclassofslides,
youbeginatthebeginning,creatinganewGenieprojectandtrainingset.
Thetypicaluserwhousestheclassifierisatechnicianwhosebasicfunctionisto
processscannedimages.Theprocessissimplifiedbecauseinsteadofmanually
identifyingstructuresontheslidetoanalyze,theuserappliesaGenieclassifier
thatisappropriatefortheslidesbeinganalyzed.

Developing the Genie Classifier


Genielearnsbyanalyzingtrainingdatapixelbypixel,lookingforvariationsin
color,pattern,density,etc.InthefirstpartoftheGenieworkflow,yourroleasa
userismainlytoprovidetrainingdataintheformofslidesthatyouhave
annotatedinImageScope.Genieanalyzesthetrainingsetsprovidedand
developsaclassifierthatmostcorrectlyidentifiestheannotatedregionsinthe
slides.SeeChapter4,CreatingaGenieClassifieronpage19fordetails.

Genie Users Guide 3


Chapter 1 Introduction to Genie

Genie Workflow
The Classifier Developer:

1 Logs into Spectrum in the Genie data hierarchy and


opens a new Genie project.

2 Creates a training set that Genie will use to learn to


identify tissue classes.

3 Prepares input for Genie by assembling existing


digital slides that contain good examples of the
structures to be identified. Adds the digital slides to
the training set.

4 Defines classes of tissue to be identified by creating


a template.

5 Annotates the digital slides in ImageScope to indicate


examples of regions containing various targets of
interest as well as examples of regions where targets
are absent of the structure represented by that
training set.

6 Creates a montage of images from slides in the set


using Genies Montage Maker.

7 Creates the classifier by running the training


algorithm on the montage. The montage consists of
all training regions marked in Step 5.

8 Tests the classifier. If performance is not satisfactory,


goes back to step 5 to adjust the classifier.

Fordetailsonperformingthesesteps,seeChapter2,
NavigatinginGenieonpage7andChapter4,
CreatingaGenieClassifieronpage19.

4 Genie Users Guide


Chapter 1 - Introduction

Integration with Other Aperio


Products
GenieworkscloselywithotherAperioapplicationsandinmostcases,
interactionamongtheprogramsisautomaticandseamless.Theinteractions
betweenGenieandtheotherAperioproductsaredescribedbrieflybelowandin
greaterdetailinthechaptersthatfollow.

Spectrum Plus
GenieisalicensedupgradetoSpectrumPlus.Afterobtainingavalidlicenseand
installingtheGeniealgorithm,toaccessGenieyoumustfirstlogintoSpectrum.
AccesstoGenieisrestrictedandisdeterminedbytherolesdefinedinSpectrum
andassignedtoauserbytheSpectrumadministrator.

ImageScope
ImageScopeallowsyoutoviewdigitalslidesandtoannotateregionsdirectlyon
aslidebyusingImageScopesdrawingtools.

Genie Users Guide 5


Chapter 1 Introduction to Genie

6 Genie Users Guide


2
Navigating in Genie

This chapter discusses the Genie components in the


Spectrum user interface.

Spectrumisadigitalpathologysolutionthatcoordinatesalltheinformation
To develop Genie aboutthedigitalslides(patientinformation,researchprojectinformation,etc.)in
classifiers, a
Spectrum user must aneasytouse,webbasedinterface.GeniefeaturesappearontheSpectrum
have access to the pageswhenaGenielicensehasbeenenteredintoSpectrumandwhentheGenie
data group
usersareassigneduserrolesthatallowaccesstoGenie.
containing the
digital slides used in
the training set as
well as any data Logging into Spectrum
included in the
Genie project. This TologintoSpectrum:
user must also be
assigned a user role 1. OpenSpectruminyourInternetbrowser.
that permits using
Genie project and
2. LogintoSpectrumwiththeusernameandpasswordsuppliedbyyour
training sets. That Spectrumadministrator.
user role should also
permit creating
Genie annotation
templates and
creating and
modifying algorithm
macros. These
permissions are
enabled by the
_Genie user role
which the Spectrum
IfyouarelogginginastheglobalSpectrumadministrator,youmaysee
administrator can
assign to Genie ascreenpromptingyoutoselectthedatahierarchytouse.
developers or can
use as a base to
initialize a new
Genie user role. For
details on user roles
and data groups, see
the
Spectrum/Spectrum
Plus Administrators
Guide.

Genie Users Guide 7


Chapter 2 Navigating in Genie

Orifyouarenotanadministratorbuthavebeenassignedmultipleuser
roles,youmayseeascreenfromwhichtochooseauserrole;selectthe
Genieuserrole.


3. SelecttheGeniedatahierarchyoruserroletologintotheGenieuser
interfaceofSpectrum.

The Spectrum Main Window


AfteryoulogintoSpectrumandselectGenieasthedatahierarchytouse(if
prompted),youllseethemainSpectrumwindow,shownbelow.


YoucannavigateamongtheGeniecomponentseitherbyclickingthelinkslisted
alongtheleftsideofthepage,orbyusingthemenubaratthetopofthepage.
GenieProjectsSeeallGenieprojectsineitherlistorfolderformat,
searchforaspecificGenieproject,oraddanewproject.
TrainingSetsViewtrainingsetsinlistorfolderformatorsearchall
trainingsetstolocateaspecificone.

8 Genie Users Guide


Chapter 2 Navigating in Genie

DigitalSlidesList,view,searchforandadddigitalslides.
ImageAnalysisViewimageanalysisjobs,macros,orclassifiers.

The Administrative Menu


TheAdministrativemenucontainsdifferentcommandsdependingonyouruser
permissions.
Attheminimum,asaGeniedeveloperyouwillbeabletoadd/modifystainsand
bodysites,adjustsystemsettings,andcreateandmaintainGenieannotation
templates.
Ifyouhaveadministrativerights,youcanusethismenutocustomizetheGenie
pagesinSpectrum,addingnewdatacolumnsorchangingdatafieldnames.For
moreinformationonthecustomizablesettingsavailableonthismenuandhow
tousethem,seetheSpectrum/SpectrumPlusAdministratorsGuide.

Overview of Genie Pages


WewilldiscusstheGeniepagesindetailinfuturechapters,buthereisan
overviewofthetwomainGeniepages:projectdetailpageandthetrainingset
detailpage.
TolistallGenieprojects,clickListAllGenieProjectsonthemainSpectrum
pageorselectAllGenieProjects(AsList)fromtheGenieProjectsmenuatthe
topofthepage.
Theprojectlistpageappears:


Toseethedetailsonaproject,clickthe iconnexttotheprojectyouare
interestedin.

Genie Users Guide 9


Chapter 2 Navigating in Genie

TheGenieProjectDetailspageappears:


whichcontainsinformationontheproject,andthetrainingsetsanddigitalslides
associatedwithit.
TolistallGenietrainingsets,clickListAllTrainingSetsonthemainSpectrum
pageorselectAllTrainingSets(AsList)fromtheGenieTrainingSetsmenuat
thetopofthepage.
Thetrainingsetslistpageappears:


Toseethedetailsonthetrainingset,clickthe nexttothetrainingsetyouare
interestedin.

10 Genie Users Guide


Chapter 2 Navigating in Genie

TheGenieTrainingSetDetailspageappears:


whichcontainsinformationontheproject,trainingsetdetails,including
informationonthemontageandannotationtemplates,andalistofthedigital
slidesinthetrainingset.

Tips for Navigating the Genie Pages


AtanytimeyoucanreturntothemainSpectrumpagebyclickingthe
Spectrumlogoatthetopleftofthepage.
YoucanuseyourbrowsersBackarrowtoreturntoapreviouspage.
BesuretoclicktheSavebuttononthepagewhenyouchangetextonthe
page.
FromanypageinSpectrumyoucanaccessaGeniepagebyusingthe
Geniemenusatthetopofthepage.

For More Information


ForgeneralinformationonusingSpectrum(suchassearching,exportingdata,
customizingSpectrum,andsoon),see:
Spectrum/SpectrumPlusOperatorsGuide
Spectrum/SpectrumPlusAdministratorsGuide
ForinformationonusingAperiosimagealgorithms,refertotheuserguidethat
camewiththespecificalgorithmyouareusing.Also,see:

Genie Users Guide 11


Chapter 2 Navigating in Genie

AperioImageAnalysisUsersGuide
DigitalIHCUsersGuide
ForinformationonusingImageScopetoviewandanalyzedigitalslides,see:
ImageScopeUsersGuide

12 Genie Users Guide


3
Working with Genie

Before you begin creating your own Genie classifiers, please


read this chapter which will introduce you to important
concepts for understanding the training process.

BeforedivingdirectlyintocreatingGenieclassifiers,itisworthwhiletospend
sometimegettingfamiliarwithGenieandconsideringhowitcanhelpyousolve
theproblemyouareworkingon.Itmaybebesttostartwithasimple
application,evenitisnotthemainapplicationthatyouareintendingtospend
yourtimeon.Aswithanynewtool,youwilllearnmanynewthingsandgain
proficiencywithtime.Itisimportanttorealizethisandbeginyourlearning
processwithsomethingsimpleandmovetomoreadvancedprojectsasyour
understandingincreases.
Afteryoureadthischapter,whichdiscusseshowtoapproachspecificissuesand
givessometroubleshootingtips,werecommendgoingthroughthestepsinthe
nextchapterforasimpleprojectsothatyouarefamiliarwiththeworkflowfor
creatingaclassifier.

Start Simple
IntroducingtoomuchcomplexityatthebeginningofyourGeniedevelopment
projectwillprovetobeveryconfusingandfrustrating.Thisisparticularlytrue
whenyouarefirstlearningGenie,butevenexperiencedalgorithmdevelopers
willagreethatworkingfromthesimpletothecomplex(introducingcomplexity
onlyasrequired)isagoodruletofollowandisthebestoverallapproach.
TrainingSlidesDontworryaboutputtingeverysampleimageyou
canfindinthetrainingsetjustaddafewrepresentativeexamplesto
beginwith.Youcanalwaysaddmoredigitalslideslater.
ParameterValuesUsetheSpectrum/Geniedefaultvaluesatfirst.As
youprogresswiththetrainingprocess,youcanconsiderchangingthese
defaultvaluesiftheperformance/accuracyofthetrainingneedstobe
improved(seeWhentoAddComplexityonpage16).
ClassesGenierequiresatleasttwoclasses,forexample,Tumorand
Background.Inthiscase,Tumoristheclassthatweareinterestedin
andBackgroundiseverythingelse.Itisnotessentialthattherebea
classforeachtypeoftissueontheslidethisisacommon
misconception.Ifyouarespecificallyinterestedinfindingand
measuringanumberofdifferenttissuetypes,thenyouwillwantaclass

Genie Users Guide 13


Chapter 3 Working with Genie

foreachtype.Thegoalshouldbetohaveasfewclassesaspossible,
whileachievinggoodperformance.
RegionsYoumustprovideatleastoneregionforeachclass.Regions
shouldbeonlyaslargeasnecessarytocapturethepatternofthetissue.
Donotaddredundantregionsthatappearsimilar.Redundanttraining
datawillonlyslowthetrainingprocessandwillnotimprovetraining
accuracy.Ifaclassisbeingusedtoidentifymorethanonetissuetype,
suchasBackground,thenyouwilllikelyneedtoaddatleastone
regionofeachtypeoftissuetobeincludedinthatclass.Dontworry
aboutgivinganexhaustivesetofregionsinthebeginning.Itisbetterto
trainwithafewregionsinthebeginning,addingmoreregionsonlyas
necessary.
MontageStartwithregionsfromasingleslide.Asyoutrainandtest
theclassifieronthatslide,youwillreachapointwhereyouaresatisfied.
Whenthisoccurs,moveontoanotherslideandtesttheclassifier.Ifyou
findareasonthatslidewherepixelsarebeingmisclassified,addregions
fromthoseareastotheproperclasses,createanewmontage,and
continuethetrainingprocess.Repeatthisprocessuntilalloftheslidesin
yourtrainingsetindicateacceptableclassifierperformance.

The Montage
CreatingagoodmontageisthekeytogeneratingagoodclassifierwithGenie.
Throughoutthetrainingprocess,youwillmodifythemontageby
adding/subtractingregionsandclassesuntilyouhavearrivedatsinglemontage
thatcapturesthevariationinherentinyourtrainingset.Onceyouhave
successfullyproducedagoodclassifier,changestothemontageneedonlybe
madewhenclassifierperformancebecomesunacceptable.Thiscanhappenwhen
Genieencountersnewstructuresinadigitalslidethatarenotrepresentedinthe
montage.SinceGeniedoesnothaveanIdontknowwhatthisisclass,Genie
willputthesenewtypesofpixelsintooneoftheprescribedclasses,andmore
oftenthannot,thiswillaffectclassesthatyoucareabout.Whenthishappens,the
newslidecanbeaddedtothetrainingsetandGenieretrainedtoproperly
classifythenewlyfoundstructures.
MontageMagnificationWhenatrainingsetisfirstcreated,the
montagemagnificationissetto5x.Ifthedigitalslidesfromwhichthe
regionsareextractedwerescannedat20x,theresolutionofthemontage
isreducedbyafactorof4.Aregioninthemontagewillhave16times
fewerpixels(4squared)thanthecorrespondingregionintheparent
image.Thishastwoadvantages:First,fewertrainingpixelsmeans
trainingwillbefaster;Second,applyingtheclassifiertoadigitalslide
willalsobemuchfaster,sincethenumberofpixelstobeprocessedwill
bereducedbyafactorof16.
The5xmontagemagnificationiswellmatchedtoothersystem
componentsintermsofcomputationaltime.Increasingto10xwillcause

14 Genie Users Guide


Chapter 3 Working with Genie

a4foldincreaseintrainingandanalysistimes.Montagemagnification
shouldonlybeincreasedifrequiredtoimproveclassifier
performance.
RemembertoUpdatetheMontageIfyouhaveadded/deletedregions
orclasses,orchangedthemontagemagnificationvalue,youmustcreate
anewmontagebeforecontinuingthetrainingprocess.Themontage
doesnotautomaticallyupdatewhenyouchangeanyoftheseitems.If
youfailtodothis,trainingwillcontinueontheoldmontageandwillnot
incorporateyourchanges.Thereiscurrentlynothinginthesystemto
indicatethatanewmontageisrequireditisuptoyoutoensurethat
youhaveacurrentmontage.

Training
AccuracyTheGenieTrainingalgorithmmakesiterativeimprovements
totheclassifierbycomparingthepredictedclasswiththeactualclassfor
thetrainingpixelsprovidedinthemontage.Thetrainingaccuracyof
eachclassisfirstcalculated;theseclassaccuraciesarethenaveraged
togethertoobtainameantrainingaccuracyachangetotheclassifier
willonlybemadeifitimprovesthemeantrainingaccuracy.Thisis
importanttounderstand,sinceitcauseseachclasstobegivenequal
weight,whenconsideringpotentialimprovementstotheclassifier.
BackgroundClass(es)Sinceitisnotpossibletogiveasingleclassmore
weightthananother,youmayfindthatclassesyoudontcareaboutare
improvingattheexpenseoftheonesyoudocareabout.Onewayto
partiallyovercomethisproblemistoputallofthetissuetypesthatyou
dontcareaboutintoasingleclass,likeBackground.Thiskeepsthe
numberofclassesyoudontcareabouttoaminimum,whichhelps
increasetheweighttotheonesthatareimportanttoyou.Youmayneed
morethanonebackgroundclass,buttrytokeepthenumberofthese
small.
ProvidingAdjacentRegionsWhenprovidingregionsfordifferent
classes,isithelpfultothetrainingprocesstoprovideregionsthatsharea
commonboundary.Youcandothisbydrawingaregioninthefirst
class,thendrawingtheregioninthesecondclasssothatoneofitsedges
isnexttotheboundaryoftheregioninthefirstclass.Sincemanyofthe
imageprocessingoperatorsusedbyGeniesensetheneighborhoodofthe
trainingpixels,thishelpsensurethattheboundariesbetweenclassesare
beingaccuratelytakenintoaccount.
ContinuingtheTrainingProcessEachtimeyourunthetraining
macroonthemontageimage,anewoutputlayeriscreated.These
outputlayersprovideahistoryofthechangingaccuracyandcanbe
usefultoreviewtoseehowfastimprovementsarebeingmade.
Wheneveranewmontageiscreated(byaddingregionsforexample),
theseoutputlayersareremoved.However,trainingonthenewmontage

Genie Users Guide 15


Chapter 3 Working with Genie

willbeginwiththecurrentclassifierasastartingpoint.Onlyifthe
numberofclassesorthetrainingalgorithmparametersarechanged
(exceptforNumberofIterations),willthetrainingbeginfromscratch.

When to Add Complexity


Complexityshouldonlybeintroducedoutofnecessity.Simpleralgorithmstend
tobemorerobustandapplytoabroadervarietyofcircumstances.Whilemore
complexalgorithmscanprovidesuperiorperformance,theytendtorequire
morecomputationaltimeandresourcesandoftenworkwellinamorenarrowly
definedsetofcircumstances.Whentrainingfailstoachieveahighenough
accuracy,addingmoreclassesand/orincreasingthenumberoffeaturescanhelp.
AddingMoreClasses
PoorSpecificityThisisthecasewhenyouaregettingtoomany
falsepositivesinaparticularclass.Youshouldfirsttryadding
examplesofthesefalsepositivestoabackgroundclass(discussed
above).Ifthisdoesnotwork,removethemfromthebackground
class,defineanewclass,andaddtheseregionstothatclass.Itmay
beadvantageoustohavemorethanonebackgroundclassinorderto
collectthevarioustissuestructuresthatarenotofinterest.
PoorSensitivityThisisthecasewhenyouaregettingtoomany
falsenegativesinaparticularclass;thatis,youarenotpickinga
significantamountoftissueforaclass.Thiscanhappenwhenthe
classcontainsalargeamountofvariationincolor,texture,
morphology,etc.Trytodetermineiftheclasscanbedividedinto
twoormorelogicalparts.Forexample,ifanumberofregionsinthe
Tumorclassarefalsenegativesandarebeingcompletely
misclassified,addaTumor2classandaddtheseregionstothat
class.Thetwotumorclassescanbecombinedinsubsequentanalysis
toformthecompletetumorclass.
TrainingParameters
AddingMoreFeaturesIfyouincreasethenumberofclasses,you
mayfinditnecessarytoincreasetheMaxNumberofFeaturesin
ordertoachievebettertrainingaccuracy.TheGenieclassifieruses
twostagesinwhichfeatureplanesarecalculated;thefirstuses
spatial/texturalfeatures,whilethesecondusesmorphological
features.Thenumberoffeaturesforeachstagecanbeincreased.The
defaultnumberoffeatures(8,3)shouldbeadequatefor3or4
classes.Ifyouhavemoreclasses,tryincreasingthenumberof
featuresproportionately.
IncreasingMaxComplexityTheMaxComplexityparameterfor
theGenieTrainingalgorithmcanbeincreased.Complexityis
proportionaltotheamountoftimerequiredtocalculateafeature.
Increasingthisparameterwillallowformorecomplexalgorithms

16 Genie Users Guide


Chapter 3 Working with Genie

doingthiswillslowthetrainingandclassificationprocesses,
however.

Algorithm Macros
Developinganamingconventionforyourmacrosiscritical.Asofthisdate,all
Spectrumusersthathaveaccesstorunningalgorithmswillseeallmacrosthat
areinthesystem.Thiscanbecomeoverwhelming,unlessusersfollowagood
namingconvention.Asanexample,HER2_Genie_Trainingand
HER2_Genie_Classifierwouldbeusefultoindicatethatthesemacroswere
associatedwiththeHER2GenieProjectandthefirstisfortrainingonthe
montageimage,whiletheotherisforapplyingtheHER2classifiertoother
digitalslides.Youmayalsowishtoaddotheridentifyinginformationtothe
macronametomakeituniqueandeasilyrecognizable.
Itisimportanttorememberthatatrainingmacrocanonlyberunonthe
montageimage,whiletheclassificationmacrocanberunonanydigitalslide.
Thesystemarchitecturecurrentlydoesnotenforcethisrequirementitisupto
youtoselectthecorrectmacrowhensubmittingananalysisjob.Thisiswhere
thenamingofmacrosbecomesimportantanditisimportantthatyoupay
particularattentionwhenselectingmacros.Ifyourunthetrainingmacroona
digitalslide,theanalysisjobwillfail.Inthiscase,allyouneedtodoisresubmit
thejobwiththeintendedmacroandthingsshouldproceedasintended.Ifyou
runanontrainingmacroonamontage,thejobwillfinishandtheresultlayer
willcontainresultsforthemacroyouran.Justdeletethislayerifyoudontwant
itandproceedwithrunningthetrainingmacroonthemontage.

Genie Users Guide 17


Chapter 3 Working with Genie

18 Genie Users Guide


4
Creating a Genie Classifier

This chapter gives step by step instructions for creating a


Genie classifier.

Step #1 Create a Genie Project


ThefirststepincreatingaclassifieristocreateanewGenieproject:
1. LogintoSpectrumasaGeniedeveloperasdiscussedinChapter2,
NavigatinginGenieonpage7.
2. OnthemainGeniewindow,clickAddNewGenieProjector,onthe
GenieProjectsmenu,clicktheAddGenieProjectlink.TheAddNew
GenieProjectspageappears:

Genie Users Guide 19


Chapter 4 Creating a Genie Classifier

3. WerecommendcreatingoneGenieproject,specifyingitsnameand
selectingthedatagrouptowhichitbelongsfromthedropdownlist,
thenclickingAdd.TheGenieProjectDetailspageappears:

Tips on Using the Project Details Page


TheGenieprojectdetailspagesummarizesbasicinformation,allowsyouto
navigatebetweenprojects,andtoaddattachmentsortrainingsetstoaproject.
TonavigatebetweenGenieprojects,clickthePreviousGenieProjector
NextGenieProjectlinks,orclickGenieProjectListtoviewallofthem.
IfyouwanttomodifytheNameorDataGroupfields,youmaydoso.
ClickSavetokeepyourchangesorResettodiscardthem.
Youcanadddocumentssuchasprojectdesigndocumentsbyusingthe
AddAttachmentlink.

Step #2 Create a Training Set


Thetrainingsetcontainssamplesofthetissueyouwanttocharacterize;Genie
analyzesthetrainingsettolearnaboutthosetissueclasses.
DecidewhatdigitalslidesyouwanttousetotrainGenie.Todothis,spendsome
timethinkingaboutwhatcharacteristicsyouwanttoidentifysoyoucancreate
aneffectiveclassifier.Itsnotagoodideatopickslidesthataretoosimilar,as
Geniewontlearnenoughfromthem.Ontheotherhand,toomuchvariationin
yoursampleswillmakeGeniesjobharderandmaydecreaseaccuracy.Formore

20 Genie Users Guide


Chapter 4 Creating a Genie Classifier

informationonmakingthisdecision,seeChapter3,WorkingwithGenieon
page13.
Thenumberofslidesdependsonthecomplexityofwhatyouaretryingto
identify,andtheamountofvariationyouwanttoencompass.
Tocreateatrainingset:
1. CreateaGenieprojectasdiscussedinStep#1.
2. OntheGenieProjectDetailspage,clickAddNewGenieTrainingSetin
theGenieProjectGenieTrainingSetssection.(Notethatyoumayhave
multipletrainingsetsforoneproject.)


TheAddNewGenieTrainingSetspageappears:
The final classifier
name will be based
on the training set
name you enter
when you create the
training set (for
example, IHC ER).
However, to ensure
that classifiers have
unique names, Genie
prepends a numeric
value to the front of 3. OntheAddNewGenieTrainingSetspage,enterthenameofthe
the classifier name.
For example, the trainingsetyouwishtoadd(forexample,IHCER),whichwillbethe
training set IHC ER basisofthenameoftheclassifieryouaregoingtocreate.
may create a
classifier named 4. Typeamontagemagnificationvalue.Thedefaultvalueis5.0,whichisa
35_IHC ER. goodstartingvalue.Forinformationonwhyyouwouldwanttochange
themagnificationvalue,seeChapter3,WorkingwithGenieonpage
13.
5. ClickAdd.
WhenyoureturntotheGenieProjectDetailspageinGenie,yournewlyadded
trainingsetislisted.

Genie Users Guide 21


Chapter 4 Creating a Genie Classifier

Tips on Using Training Sets


ToviewalistoftrainingsetsthatexistinGenie:
1. GototheGenieTrainingSetsmenuatthetopoftheSpectrumpage,then
clickeitherAllTrainingSets(asList)orAllTrainingSets(asFolders)
todisplayalisting.
2. Todisplaythetrainingsetdetailspageforanyofthetrainingsetslisted,
selectthecheckboxbesidetheTrainingSetIDnumberandclickOpen
Dataorclickthe iconnexttothetrainingsetyouareinterestedin.
ToaddanexistingtrainingsettoaGenieproject:
1. Openatrainingsetasdiscussedabove.
2. ClickAssigntoExistingGenieProject.


Rememberthatatrainingsetcanhaveonlyoneparentproject.Ifyou
wanttoaddatrainingsetthathasalreadybeenassignedtoanother
Genieproject,youwillhavetodetachitfromthatprojectfirst.

22 Genie Users Guide


Chapter 4 Creating a Genie Classifier

3. ClickAssignnexttotheGenieprojectyouwanttoassignthetrainingset
to.(IfyouhavemultipleGenieprojects,youcanusetheFilterOptionsto
searchforaspecificproject.SeetheSpectrum/SpectrumPlusOperators
GuidefordetailsonusingtheSpectrumsearchfunctions.)


YoureturntotheGenieprojectdetailpagewhereyouseethetrainingset
hasbeenadded:

Step #3 Add Slides to the Training Set


AsdiscussedinStep#2,choosingthedigitalslidesforyourtrainingsetisan
importantdecision,andcanaffecttheusefulnessoftheclassifieryoucreate,sobe
carefultochoosedigitalslidesthathavegoodsamplesofthestructuresyouare
tryingtoidentify.

Genie Users Guide 23


Chapter 4 Creating a Genie Classifier

Toadddigitalslidestothetrainingset:
1. GototheGenieTrainingSetsmenuatthetopoftheSpectrumpageand
selectAllGenieTrainingSets(AsList).Youseealistoftrainingsets:


2. OntheGenieTrainingSetspage,openatrainingsetbyclickingthe
iconnexttoit.Adetailspageappears:


3. IntheGenieTrainingSetDigitalSlidessection,clickAddNewDigital
Slidetoaddadigitalslidethatdoesnotyetexist(youcanadditsimage
lateraftertheslideisscanned),orAddExistingDigitalSlidetoadda
digitalslidethathasalreadybeendefinedinSpectrum.

24 Genie Users Guide


Chapter 4 Creating a Genie Classifier

Ifaddingexistingdigitalslides,youseetheAddUnassignedDigital
SlidestoGenieTrainingSetpage,whichcontainsalistofalldigital
slidesthatcanbeaddedtothistrainingset(thatis,slidesthatarenot
alreadyassignedtoanothertrainingset):


NotetheFilterOptionssectionwhichallowsyoutosearchforslidesthat
meetcertaincriteria(suchasslidesthatarestainedwithanERstain).
Tip:Ifyouwanttousethesamedigitalslideinmultipletrainingsets,
copytheslideusingadifferentnamesothatitappearsinSpectrumasa
differentslide.
4. Selecttheslidesyouwanttousebyselectingthecheckboxnexttoeach
one,andthenclickingAssignatthetopoftheslidelist.

Genie Users Guide 25


Chapter 4 Creating a Genie Classifier

Step #4 Define Classes of Tissue (Create a


Template)
Aftersettingupthetrainingset,youneedtodefinetheclassesoftissue
structuresyouaregoingtofind.Thisisdonebybuildinganannotationtemplate
thatdefinestheclasses.
Geniecreatescolorcodedlayersbasedontheseclasses,makingiteasyto
distinguishtheannotatedregions.Theselayersarestoredintheannotation
templatethatisassociatedwiththetrainingset.

Whenyouaddslidestoatrainingset,Genieappliestheannotationtemplatefor
thesettothatslide.Ifyoueditthedefinitionsoftheclassesandcorresponding
layerpropertiesintheannotationtemplateforoneslideinatrainingset,Genie
modifiesthecorrespondingannotationlayersforallslidesintheset.For
example,ifyouaddordeleteclassesorchangethenamesorcolorsofassociated
layers,theseannotationpropertieswillbemodifiedthroughoutthetrainingset.
1. Openthetrainingset.Youcandothisinavarietyofways:
a) GototheGenieTrainingSetsmenuatthetopofthepageandselect
AllGenieTrainingSets(AsList)andthenclick nexttothe
trainingsetyouwanttoopen;or,
b) OpenaprojectandundertheGenieProjectsGenieTrainingSets
click nexttothetrainingsetassignedtothatproject.

26 Genie Users Guide


Chapter 4 Creating a Genie Classifier

2. Onthetrainingsetdetailspage,undertheGenieTrainingSetTemplate
section,clickAddClass.


Anewboxappearsinwhichyoucantypethenameoftheclass(for
example,Tumor):


3. ClickAddClasstoaddanotherclass(forexample,Background).
4. ClickSave.

Tips on Creating Templates


YoucanusetheChooseColorbuttontoselectthecolorthatwillbeused
todisplaythisclass.
YoucanalsoloadsettingsfromanexistingtemplatebyusingtheLoad
fromTemplatebutton.(SeeCreatingaTemplateforUsewithMultiple
TrainingSetsonpage28forinformationoncreatingatemplatethatcan
beusedwithmultipletrainingsets.)
Youcanmodifythetemplatebyaddinganddeletinglayers,renaming
them,changingtheircolorsandaddingattributes.(Youcanuse
attributestoadddescriptivetexttotheclassortocreatefieldsintowhich
textcanbemanuallyenteredlater.)

Genie Users Guide 27


Chapter 4 Creating a Genie Classifier

Creating a Template for Use with Multiple Training Sets


Insteadofcreatingatemplateforeachtrainingset,youcancreateandsavea
templatethatcanbeappliedtomultipletrainingsets.

1. GototheAdministrativemenuatthetopoftheSpectrumpageand
selectGenieAnnotationTemplates.TheAddAnnotationTemplate
pageappears:


2. Enteratemplatename.
3. Todefinetheclassesinthistemplate,clickAdd.
4. Anewboxappearsinwhichyoucantypethenameoftheclass.


5. KeepclickingAdduntilyouenteralltheclassesyouwanttouse.
6. Ifyouwanttoaddattributestotheclass,clickAddAttributetoClass.
7. Ifyouwanttochangethecolorwithwhichtissueidentifiedasbelonging
totheclasswillbedisplayed,clickChooseColor.

8. Whenfinishedwiththetemplate,clickSaveanditappearsonthe
AnnotationsTemplatespage:


Toapplyanannotationtemplatetoatrainingset:

1. Openatrainingset.

28 Genie Users Guide


Chapter 4 Creating a Genie Classifier

2. IntheGenieTrainingSetTemplatesectionofthetrainingsetdetails
If your Internet
browser is set to page,clickLoadfromTemplateandselectthetemplateyoucreated
open popup fromthepopupwindowthatappears.
windows in a tab
instead of a new
window, the list of
templates will open
in a new tabafter
you select the
template, you may
have a problem
returning to the

main Spectrum
page. For this
reason, we
Step #5 Mark Training Samples
recommend you
Foreachofthedigitalslidesinthetrainingset,youneedtodrawannotations
change your browser
options to open a thatidentifythetypeoftissueyoudefinedinStep#4,sothatGeniecanbe
popup in a new trainedonwhattissuefitsthosedefinitions.
window rather than
in a tab. 1. OpenthetrainingsetandgototheGenieTrainingSetDigitalSlides
section.


2. ClickonthethumbnailimageofthefirstslidetoopenitinImageScope.
3. Changetheslidemagnificationusingthezoomslidertoamagnification
thatmakesiteasiertoviewcellstructures.

4. GototheImageScopeViewmenuandselectAnnotationstoseethe
templatedefinedforthistrainingset.Forexample:

When you mark


training regions on
digital slides in the
training set,
remember that at
least one region for
each template class
must be marked (not
on each slide, but in Everydigitalslideinthistrainingsetusesthissametemplate.
the entire set of
training slides). 5. Clickonanamedlayertoselectthattypeoftissue(forexample,Tissue),
andusetheImageScope pentooltodrawanannotationarounda
goodexampleofthattypeoftissue.Dothesameinseveralareasofthe
slide.Notethatyoucanalsousetherectangleandellipsisdrawingtools.
Youcanalsousethenegativepentool todrawanannotationaround
anareayouwishtoexcludefromanalysisinthiscase,theareamarked
withthenegativepenmustbeentirelysurroundedbyaregion
boundary.Seetheexamplebelow.

Genie Users Guide 29


Chapter 4 Creating a Genie Classifier

6. Clickonanothernamedlayeranddrawannotationsforthattypeof
tissue.
Thecolorsusedfortheannotationsarethesameasyoupreviously
definedinthetemplate.Inourexample,thegreenshapesontheleft
identifytumorcells,andtheyellowregionontherightidentifies
backgroundtissue.Notetheuseofthenegativepentodrawanareato
excludefromanalysis(thedottedlinewithintherectanglebelow)


Ifthecolorsdonotmatchthecolorsassignedinthetemplateforthat
typeoftissue,youmaynothaveclickedonthecorrectlayerbefore
drawing.Ifyouneedtodeleteanannotation,youcandosobyclickingit
toselectitandpressingtheDeletekeyonyourkeyboard.

7. SavetheannotationsbyclosingtheimageinImageScopeandclicking
Yeswhenpromptedtosavethechanges.

8. Openthenextdigitalslideandannotatethetissuetypes.Repeatforeach
slide.

Step #6 Create the Montage


Themontageisasingleimageconsistingofallofthetrainingregionsthathave
beendrawnonthedigitalslides(seeStep#5)andwillbeusedbytheGenie
trainingalgorithmtolearnabouttissueclassifications.
Tocreateamontage:
1. Openatrainingset.

30 Genie Users Guide


Chapter 4 Creating a Genie Classifier

2. IntheGenieTrainingSetDetailssectionofthepage,clickCreate
Montage.(TheMontageMagnificationboxshouldalreadycontaina
valuelowermagnificationscanbeusedtomakethetrainingand
classificationrunfaster.Youcanexperimentwiththisvaluelatertosee
whichvaluesgiveacceptableperformance.)Ifyouchangethe
magnificationvaluehere,itwillnottakeeffectuntilyouclickCreate
Montagetocreateanewmontage.


Asthemontageiscreated,youseetextnexttotheRunAnalysislink
cyclethroughstatusmessagesuntilitsaysMontageComplete.
3. Whenprocessingiscomplete,themontageappearsintheGenieTraining
SetMontageImagesection:


Whenyougenerateamontage,Geniecreatesanannotationlayerthatcontains
theclassnamesandthecolorsusedtocolorcodethecorrespondingclassesinthe
markupimage.

Step #7 Create the Classifier


Nowthatyouhavecreatedthemontage,youwillruntheGenietraining
algorithmonittocreatetheclassifier.

Genie Users Guide 31


Chapter 4 Creating a Genie Classifier

Toseealargerversionofthemontage:
1. Clickonthethumbnailimageofthemontagetoseetheimagein
ImageScope.
2. Themontageshowsthemarkupimagesinasemitransparentlayer.The
markuplayerusesthesamecolorpaletteusedtodesignatetheclasses If you change any of
the regions in the
andassociatedlayersdefinedinthetrainingsettemplate. digital slides in a
training set (for
example, adding or
deleting regions) or
change the montage
magnification, you
must re-create the
montage for the
changes to take
effect in the
montage.

Create a Training Macro


ThetrainingmacroisbasedontheGenietrainingalgorithmandisusedto
analyzethetrainingmontagetocreateaGenieclassifier.Notethatyouonlyuse
trainingmacrostoanalyzetrainingmontages,nevertoanalyzeindividualdigital
slides.Thetrainingmacroisageneralalgorithmandcanbeusedtoanalyzeany
trainingmontage.Theclassifierthatiscreatedisaspecificpreprocessorthat
identifiesspecifictissuetypesbasedonthetemplateyouusedtoannotatethe
trainingsetslides.

32 Genie Users Guide


Chapter 4 Creating a Genie Classifier

WiththemontageopeninImageScope:
1. GototheViewmenuontheImageScopemenubarandselectAnalysis.
TheAlgorithmServerJobwindowappears:


Thiswindowshowsthealgorithmmacrosthathavealreadybeen
created.Onthiswindowyoucantestanexistingmacro,createanew
macro,oranalyzewiththeselectedmacro.
2. ClickCreateontheAlgorithmServerJobwindowtoseethelistof
availablealgorithmsfromwhichmacroscanbecreated.
3. ClickGenieTrainingontheSelectanAlgorithmwindowtoselectitand
clickSelect:

Genie Users Guide 33


Chapter 4 Creating a Genie Classifier

YounowseetheGenieTrainingalgorithmparameters.Foraquick
referencetotheseparameters,seeAppendixA,GenieTrainingand
ClassifierAlgorithmParametersonpage51.
Inmostcases,youcanleavetheseparameterssettotheirdefaultvalues,
butoneparameterthatyoumightwanttoexperimentwithisthe
NumberofIterationsparameter.Thedefaultvalueis200.Inadjusting
thisnumber,youneedtobalancethecomplexityofyourproblemand
analysistime.Generally,thegreaterthenumberofiterations,thebetter
theaccuracy(andthelongertheanalysistime)butafterapoint
increasingthisnumberresultsinverylittleimprovement.
BecauseGenielearnseachtimeyourunthetrainingmacro,runningthe
trainingmacrooncewith1,000iterationshasthesameeffectasrunning
itfivetimeswith200iterations.Formoreinformationonusingthe
parameterstofinetuneyourtraining,seeChapter3,Workingwith
Genieonpage13.


4. ClickSaveMacro.(Thetrainingmacroconsistsofalloftheparameter
settingsforthetrainingalgorithmandisusedtoanalyzethetraining

34 Genie Users Guide


Chapter 4 Creating a Genie Classifier

montage.)DontclickRunyouwillbeusingtheRunAnalysislinkon
theSpectrumTrainingSetDetailspagetoanalyzethemontagewiththis
macro.
5. Inthesavemacrowindow,typeanamesuchasGenieTrainingIHC
andclickOK.
6. CloseImageScope.

Run the Training Analysis


1. IntheGenieTrainingSetMontageImagesectionofthetrainingset
detailspage,clickRunAnalysis.

Genie Users Guide 35


Chapter 4 Creating a Genie Classifier

2. OntheAnalysispage,makesurethemacroyousavedaboveisshownin
theSelectAnalysisMacrobox.Alsoselect:
a) Createmarkupimage(s)
b) MostRecentintheSelectInputAnnotationLayer


2. ClickAnalyze.Thissubmitstheanalysisjobandtakesyoutothe
AnalysisJobspage.Notethattheanalysismaytakeawhile,depending
onhowmanydigitalslidesyouincludedinthetrainingsetandthe
magnificationsetforthemontage.Whentheanalysisisfinished,this
pageshowsCompleteintheStatuscolumn.PressF5torefreshthepage
toseethelatestanalysisstatus.


3. Whentheanalysisiscomplete,openthetrainingset.
4. ClickonthethumbnailofthemontagetoopenitinImageScope.Yousee
aresultlayerintheImageScopeAnnotationswindow(GenieTraining
output)inadditiontotheoriginalmontagelayer.ClicktheGenie
Trainingoutputlayertoseethetrainingresults:

36 Genie Users Guide


Chapter 4 Creating a Genie Classifier

TheMeanTrainingAccuracyvalueistheprimaryindicatorofthe
effectivenessofthetraininganalysis.Youwillnotachieveperfection,
100%,butyoucandecideforyourselfwhatpercentageisacceptablefor
yourproject.
AndyouseethemarkupimageinthemainImageScopewindow:


IfthemarkupimageintheImageScopewindowshowssmallerareasof
colorinthemiddleofanothercolor,theserepresenterrorsintraining.
Forexample,ifthetumorareasaregreenandbackgroundareasare
yellow,smallbitsofgreeninbackgroundareasrepresentclassification
errors:

Genie Users Guide 37


Chapter 4 Creating a Genie Classifier

RunningthetrainingalgorithmhascreatedtheGenieclassifier,whichwewill
testinthenextstep.SeeChapter3,WorkingwithGenieonpage13fortipson
maximizingtrainingaccuracy.

Viewing the Montage Regions in Context


YoucanusetheImageScopelinkfeaturetoviewthedifferentregionsinthe
montageintheiroriginalcontextinthetrainingslide.Ontheoriginaldigital
slide,youcanredrawtheregion,deleteit,oraddadditionalregionstoanyofthe
classlayers.Besuretorecreatethemontageagainifyouchangetheregionsto
includethesechangesinthemontage.
FordetailsonusingtheImageScopeLinkManager,seetheImageScopeUsers
Guide.NotethatbecauseGenieautomaticallycreatesthelinksforyouinthe
montage,youdonothavetousetheLinkManageritself(the icononthe
ImageScopetoolbar)tosetuptheselinks,butonlyneedtousetheforwardlink
icon tonavigatethroughtheexistinglinks.
1. IfnotalreadyopeninImageScope,clickonthemontagethumbnail
imageonthetrainingsetdetailpagetoopenitinImageScope.
2. Clickontherectangularborderaroundaregiontoselectit.Or,selectthe
regionbyclickingitintheAnnotationswindowLayerRegionspane.
Whenselected,theregionbordercontainsablackline:

38 Genie Users Guide


Chapter 4 Creating a Genie Classifier

3. NowclicktheNextLinkiconontheImageScopetoolbar, .
ImageScopeopenstheoriginaldigitalslideonwhichtheregionwas
drawnandcenterstheannotationinthemiddleoftheImageScope
window.(Theblacklineinitsboundaryindicateswhichregionis
selected.)


Ifyouhavethefilmstripturnedon,youcanseethatthemontageandthedigital
slidearebothopenatthesametime.(Toturnonthefilmstrip,gototheView
menuandselectFilmstrip.)
Youcanclickonthemontageinthefilmstriptogobacktothemontage,select
anotherregion,andclick togotoitsparentdigitalslide.

Step #8 Test the Classifier


NowthatyouhavecreatedtheGenieclassifier,youwillwanttotestittosee
howwellitidentifiesthetissueclasses.

Create a Testing Region


1. Opentheprojectorthetrainingsetandopenoneofthetrainingset
digitalslidesbyclickingonitsthumbnailinthedigitalslidelist.
2. GototheImageScopeViewmenuandselectAnnotations.Youseethe
trainingsettemplateintheAnnotationswindow.

Genie Users Guide 39


Chapter 4 Creating a Genie Classifier

3. Createanewlayerfortestingpurposesbyclicking ontheLayerspane
oftheAnnotationswindow.


4. Clickonthedefaultlayernameandchangeittosomethingthatwill
remindyouofitspurpose,likeTest.


5. ClickonthatlayerintheAnnotationswindowtoselectitandusethe
ImageScoperectangletooltodrawatestingregionontheimagewhichis
largerthantheoriginaltissueannotations:


6. Savethenewannotationbyclicking ontheLayerspaneinthe
Annotationswindow.

40 Genie Users Guide


Chapter 4 Creating a Genie Classifier

Create a Classification Macro


1. GototheViewmenuontheImageScopemenubarandselectAnalysis.
TheAlgorithmServerJobwindowappears:


2. ClickCreateontheAlgorithmServerJobwindowtoseethelistof
availablealgorithms.


3. ClicktheGenieClassifieralgorithmontheSelectanAlgorithmwindow
andclickSelect.

Genie Users Guide 41


Chapter 4 Creating a Genie Classifier

YounowseetheGenieClassifieralgorithmparameters.Foraquick
referencetotheseparameters,seeAppendixA,GenieTrainingand
ClassifierAlgorithmParametersonpage51.

42 Genie Users Guide


Chapter 4 Creating a Genie Classifier

4. Selecttheclassifieryouwanttousetocreatethemacrofromthe
Classifierdropdownlist(thisisthenamewegaveourtrainingset).The
listwillcontaineveryclassifieryouhavedevelopedontheSpectrum
site.

Genie Users Guide 43


Chapter 4 Creating a Genie Classifier

5. ClickintheClassListboxtoseetheclassesyoudefinedandselect
whichclassesyouwanttouseforthismacro.


6. ClickSaveMacro.
7. Inthesavemacrowindow,typeanamethatidentifiestheclassifieryou
selected,suchasIHC_ERandclickOK.

44 Genie Users Guide


Chapter 4 Creating a Genie Classifier

Run the Classifier Macro


Theclassifiermacroistiedtoaspecificclassifier.
1. Openthedigitalslideonwhichyoucreatedthetestingregion.
2. GototheImageScopeViewmenuandselectAnalysis.
3. OntheAlgorithmServerJobwindow,selectthemacroyoucreated
above.


4. ClickAnalyze.
Whentheanalysiscompletes,theAnnotationswindowshowsanalysis
resultsintheTestlayeryoucreated,withthefractionalcontentofeach
classasapercentageoftheregionofanalysis.Alsoshownisamarkup
imageinthemainwindowthatshowsthecolorcodedtissueclasses.

Improving Classification Performance


SeeChapter3,WorkingwithGenieonpage13fortipsonimproving
classificationperformance.Herearesomegeneraltips:

Genie Users Guide 45


Chapter 4 Creating a Genie Classifier

1. AddregionsintheimagewheretissueclassesweremissedintheGenie
Classifieroutputlayer.Smallerareasofcolorinthemiddleofanother
colorintheImageScopemarkupimagerepresenterrorsintraining.For
example,ifthetumorareasaregreenandbackgroundareasareyellow,
smallbitsofyellowintumorareasrepresentclassificationerrors.
2. Reducethemontagemagnificationtospeedupthecalculationsand
createanewmontageimage.
3. RuntheGenietrainingalgorithmmacro.
4. Openthemontageimageandviewtheresults.
5. Openthedigitalslideandanalyzethesametestregionasbefore.Now
youwillseethatthetissueclassregionsaremuchmorefilledinandthe
classifierisdoingabetterjobatfindingmostofthetissueofthattype.

Exporting and Importing Classifiers


EveryclassifieryoucreatecanbeusedbyanyoneonyourSpectrumsitewhohas
permissiontoanalyzeimages.
ClassifiersyouhavedevelopedononeSpectrumsitecanbeexportedandthen
importedonanotherSpectrumsite.Thisallowsyoutoshareclassifierswith
otherSpectrumsites.

To Export a Classifier
1. LoggedinasaSpectrumadministrator,gototheAnalysismenuand
selectMacros.

2. OntheAnalysisMacrospage,chooseaclassifierintheClassifierssection
andclickExport.


3. YourInternetbrowserdisplaysitsstandardwindowforsavingafile;
savethefiletoyourdisk.Thefileissavedwitha.GSFextension.

46 Genie Users Guide


Chapter 4 Creating a Genie Classifier

To Import a Classifier
1. LoggedinasaSpectrumadministrator,gototheAnalysismenuand
selectMacros.

2. OntheAnalysisMacrospage,clickImportintheClassifierssectionof
thepage.YouseetheImportClassifierDefinitionpage:


3. TypeanamefortheclassifierintheNametextbox.
4. ClicktheBrowsebuttontofindthe.GSFfilethatistheexported
classifier.

5. Selectthedatagrouptoputtheclassifierinto.
6. ClickImport.

Using the Classifier


WhenthedeveloperhascreatedtheGenieclassifier,theclassifierisreadytobe
usedbyotherSpectrumusers.Thisishowtheimageanalysisuserusesa
classifier:
1. LogintoSpectrumasanadministrator.
2. OpenadigitalslidefromSpectruminImageScope.
3. GototheViewmenuandselectAnalysis(ortypeControlG)toopenthe
AlgorithmServerJobwindow:

Genie Users Guide 47


Chapter 4 Creating a Genie Classifier

4. ClickCreatetocreateanewmacro.
5. OntheSelectanAlgorithmwindow,selectanalgorithm(forexample,
thePositivePixelCountalgorithm)andclickSelect.
6. Onthealgorithmparameterswindow,selectaGenieclassifierinthe
Classifierbox.YouhaveavailableanyoftheGenieclassifiersstoredon
thisSpectrumsitetouseasapreprocessortothealgorithmforwhich
youarecreatingthemacro.


7. Onthealgorithmparameterswindow,modifytheClassListparameter
toselecttheclassestouseforanalysis.Clickthe editicononthe
ClassListlinetoseetheclasses:


Andthenclearthecheckboxnexttoanyclassesyoudontwanttouse.
8. Savethemacrowithauniquename.

48 Genie Users Guide


Chapter 4 Creating a Genie Classifier

Spectrumuserscannowrunthesavedalgorithmmacroatanytime,andthe
Genieclassifierwillbeusedtopreidentifyareasonwhichtoruntheanalysis.

Results of Using the Genie Classifier


AfterthealgorithmuserrunsamacrothatusesaGenieclassifier,themarkup
imageistheeasiestwaytoseehowtheclassifierhasaffectedtheanalysisresults.
Theexamplebelowshowstheportionofadigitalslidethatwasselectedfor
analysis.


WethenusedthePositivePixelCountalgorithm,selectingaGenieclassifierthat
identifiespossibletumorcells.Afterrunningthealgorithm,notethecolored
areasofthemarkupimage.

Genie Users Guide 49


Chapter 4 Creating a Genie Classifier

ThecoloredareasindicatethetissuethatwasidentifiedbytheGenieclassifieras
tumorcellstherefore,onlythisareaoftheselectedregionwasanalyzedbythe
PositivePixelCountalgorithm.Thecolorscorrespondtothequantitativeresults
returnedbythealgorithm(forexample,thedarkredpixelsarethoseidentified
byPositivePixelCountasstronglypositivepixels)asshownintheanalysis
resultslayerintheAnnotationswindow:


Theareathatisinblackandwhiteindicatestissuethatwasnotidentifiedbythe
Genieclassifierastumorcellsandsowasnotanalyzed.

50 Genie Users Guide


A
Genie Training and Classifier
Algorithm Parameters

This appendix contains quick reference information on the


parameters you can supply to the Genie training and
classifier algorithms during the process of creating a Genie
classifier.

Genie Training Algorithm Parameters


TheGenieTrainingAlgorithmparameterwindowshowsanumberofitemsyou
canadjusttoaffecttissueidentification:

Genie Users Guide 51


Appendix A Genie Training and Classifier Algorithm Parameters

Introduction to Genie Training Architecture


Broadlyspeaking,Genietrainingisarandomlyiterativeprocessinwhich
differentimageprocessingfeaturesareconstantlygeneratedandappliedto
createaclassifierortoimproveonanexistingone.Differentparameterscanbe
adjustedtoguidethetraininginaspecificway.Becauseoftherandomnatureof
thetrainingprocess,itishardtoquantifytheeffectsofchangingaparameteron
theaccuracy.Similarparameterchangescanhavecontrastingeffectsbecauseof
trainingdataorrandomness.Wesuggestyouusethedefaultparametersfor
GenietrainingunlessyouunderstandtheGeniearchitectureandparameter
definitions.PleaserefertothedrawingbelowforanoverviewofGenie
architecture.

Genie Architecture
A Input Montage Image.

B Evolving Spectral/Textural Features (1st Stage)

C Mahalanobis Classifier Combines Spectral/Textural Features into a


Preliminary Classification i\Image. (1st Stage)

D Evolving Morphological Features (2nd Stage)

E Mahalanobis Classifier Combines Morphological Features into a


Final Classification Image (2nd Stage)

F Output Final Classification Image/Result

52 Genie Users Guide


Appendix A Genie Training and Classifier Algorithm Parameters

Genie Training Parameter Definitions


ThefollowingparametersappearontheGenieTrainingAlgorithmwindow:
ViewWidth,ViewHeight,OverlapSize,andImageZoomCannotbe
changed.
MarkupCompressionTypeSetsthecompressiontypeforthe
algorithmanalysismarkupimage.Thedefaultvalueis0Sameas
processedimage.
CompressionQualityHighercompressionqualitymakestheanalysis
takelongertoprocessandresultsinalargerimagefile.Thisvaluedoes
notapplytoallcompressiontypes.Thedefaultvalueis70.
FirstStageModeChooseamodeforthefirsttrainingstage.The
defaultis0Spatial/TexturalFeaturesonly(0).Otheroptionsare1
RawImagePlanesOnlyand2Spatial/TexturalFeatures+RawImage
Planes.RawImagePlanesaresimplyRed,GreenandBluechannelsof
theMontageImage.
NumberofFeaturesinFirstStageNumberoffeatureattributestobe
usedinthefirststageofthetraining.Thedefaultvalueis8.Alarger
valuemaybeusefulforcomplexproblems.Valueslargerthan12are
memoryintensiveandtimeconsuming.
SecondStageModeModetobeusedforthesecondstageoftraining.
Thedefaultis1IncludeMorphologicalFeatures.Anotheroptionis0
NoMorphologicalFeatures.
NumberofFeaturesinSecondStageNumberoffeatureattributesto
beusedinthesecondstageoftraining.Thedefaultvalueis3.
NumberofStageIterationsNumberofiterationsbeforeoptimizing
thenextstage.Thedefaultvalueis10.
DataModelingModeSelectsamodeformodelingthedataasa
Gaussiandistribution.Thedefaultvalueis1Uniform.Otheroptions
are:0IndependentDistribution,2SemiUniformDistribution.
RegularizationParameterThisvalueaffectsthestabilityofthe
training.Thedefaultvalueis0.01.
NumberofIterationsTotalnumberofiterationsthetrainingwillgo
through.Thedefaultvalueis200.
RandomSeedSetstherandomnumbergeneratorseedforthe
evolutionofthetraining.Thedefaultvalueofzeroallowstherandom
numbergeneratortosetitsseedfromthecurrentstateofthehost
computersclock.Forrepeatableresults(classifiers),afixedrandomseed
canbesetbychoosingthesamenonzerovalue(say2).
MaxComplexityDeterminesthecomplexityofafeatureateachstage
ofthetraining.Thedefaultvalueis10.

Genie Users Guide 53


Appendix A Genie Training and Classifier Algorithm Parameters

Genie Training Algorithm Output Parameters


OutputparametersthatcanbeselectedorunselectedfordisplayonSpectrum
pagesare:
TotalTrainingPixels
CorrectlyClassifiedPixels
OverallTrainingAccuracy
Allareselectedbydefault.

Genie Classifier Algorithm Parameters


TheGenieClassifierAlgorithmparameterwindowshowsanumberofitemsyou
canadjust:

Genie Classifier Algorithm Input Parameters


ViewWidthWidthofprocessingbox.
ViewHeightHeightofprocessingbox.
OverlapSizeSizeoftheoverlapregionforeachview.Theimageis
processedinblocks(views)andoverlapisprovidedtoensurethat
regionsareprocessedonlyonce
ImageZoom1.0(recommended)forprocessingofallpixels.Canbe
reducedto0.5forfasterprocessing;however,theresultsmaynotbeas
accurate.

54 Genie Users Guide


Appendix A Genie Training and Classifier Algorithm Parameters

MarkupCompressionTypeYoucanselectamongSameasprocessed
image,JPEG,orJPEG2000forthemarkupimage.
CompressionQualityForthecompressedmarkupimage,youcan
selectacompressionqualityof0to95.Higherqualitytakeslongerand
yieldslargerfiles.
ClassifierNeighborhoodSizeinmicronsofneighborhoodtopad
boundaryofeachview,asrequiredbytheclassifier.Thisparameteris
usefulinremovingedgeartifactsbetweenviews.Oncetheuserpicksa
classifierfromthelist,theappropriateClassifierNeighborhoodvalueis
automaticallycomputedandpopulated.Thereisanupperthresholdon
ClassifierNeighborhood(200microns)forspeedpurposes,whenitis
automaticallycomputed.Manualoverrideispossibleupto500microns.
ItisadvisedtosettheClassifierNeighborhoodmanuallyonlywhenthe
automaticvaluereaches200micronsandvisibleedgeartifactsareseenat
viewboundaries.
ClassifierThisparameterallowsyoutoselectfromthelistofclassifiers
thathavebeencreatedonthisSpectrumsite.

ClassListClickthe editicononthislinetochoosetheclasses
definedfortheselectedclassifier.

Genie Users Guide 55


Appendix A Genie Training and Classifier Algorithm Parameters

56 Genie Users Guide


Index

algorithmmacros,naming,17 developing,14
annotationtemplate,26 magnification,14
backgroundclasses,15 updating,15
classtemplate,26 viewingparentslides,38
multipleuse,28 navigating
classes,13 Geniepages,8
adding,16,26 tips,11
background,15 overviewofGeniepages,9
choosing,13 prerequisites,2,7
regions,14 project
classificationperformance,improving,15,45 complexity,13,16
classifier,3 creating,19
creating,31 tips,20
creatingmacro,41 regions,14
exporting,46 Spectrum,5,7
importing,46 administratorlogin,7
introduction,2 logginginto,7
testing,39 mainwindow,8
using,47 userroles,8
classifieralgorithm template,26
parameters,54 attributes,27
running,45 multiuse,28
exporting/importingclassifiers,46 tips,27
Genie testingregion,creating,39
applicationsof,1 training,15
architecture,52 accuracy,15
gettingstartedwith,13 trainingalgorithm,17
introduction,3,13 parameters,13,16,51
logginginto,7 running,35
originsof,1 trainingmacro,creating,33
userpermisionsrequired,7 trainingsamples,creating,29
gettingstarted,13 trainingset,22
ImageScope,5 addingslides,23
LosAlamosNationalLaboratories(LANL) choosingslides,13,23
andGeniedevelopment,1 creating,20
manuals,11 defined,20
montage tips,14
creating,30 troubleshooting,13
defined,30

Genie Users Guide 57


Genie Users Guide


MAN-0098, Revision A

You might also like