Documente Academic
Documente Profesional
Documente Cultură
CrowdBehaviourforAutomatic and
Accurate Surveillance
1470
3.3.3. ViolenceDetection.Thisphaseinvolvesdetectionofdist
urbanceorviolenceinlivecrowdsurveillancevideosinrealtime.
TheinputsurveillancevideoispreprocessedandViolentFlowDe
scriptorsaregenerateddynamicallyinRealTime.Foreachsecon
dofvideo,featuresareextractedandaregivenasinputtothetraine
dmodelforclassificationandviolencedetection.Ifsomedisturba
nceorviolenceis
detected,itwillbereportedasanalertstatingthatitis
violencealongwiththetimeithasoccurredwithinasecond
ofoccurrence.
3.3.4. Feedback.IntheViolenceDetectionphase,astherealtim
esurveillancetakesplace,thefeaturesgeneratedforeverysecond
aretestedagainsttrainedmodelforclassifi-
cationandviolencedetection.Thosefeatures,alongwith
theiractualoutput(providedbyhuman)generatedbythetrainedm
odelaregivenasfeedbacktothemodel.Thisallowscontinuoustra
iningofneuralnetmodelwhichhelpstoincreasetheaccuracyofcl
assificationandalsofasterdetectionofviolence.
Figure1.ProcessingSpeedswithIntelCentrinoProcessor
3.4. ExtractionofInterestingFeatures
AdaBoostisanensembleofweakclassifiers.AdaBoost
isanalgorithmwhichcouldtellustheimportantsetof
featuresthathelpusclassifyourfeatures.ForthistheFeatureSelec
tionAlgorithmthroughAdaBoost[4]isused.
Oncethefeaturesarearrangedinincreasingorderofthe
errorrates,wecanobtainthefeaturesamongtotal336
featureswhicharehighlyefficientinclassifyingvideos.Theweak
classifiersusedherearedecisionstumps(decisiontreeofheight1)
.
4. Implementation
Inthebelowsubsectionsweprovidetheimplementationdetai
lsandtheoutputsanalysis.Clearanalysisofthesystem
willbedoneinthenextsection.
4.1. ContinuousSurveillance
Figure2.ProcessingSpeedswithInteli5Processor
Weusedtwosetsofconfigurationsforcalculatingpro-
cessingspeedsofthesystem.FirstConfigurationconsistsof
4GBRAM,IntelCentrinoProcessorwithUbuntuOS.Sec- Abovearetwofiguresshowingtherunningtimeofthesystem.
ondConfigurationconsistsof8GBRAM,Inteli5Processor Thetotallengthofvideotakenunderconsiderationisnearly200se
withDebianOS. conds.Proposedsystemisabletodetectthe
Foravideowhichisnotinitiallyviolentbutlateronbecomesvi exactsecondofviolenceoccurrencei.ewheretheframesgofromn
olent,theproposedsystemisabletodetectthe on-
exactinstancewherethevideoframesgofromviolenttonon- violenttoviolent.WithIntelcentrinoprocessorFig.1,theprocess
violent.ConsideringReal- ingisbeingcompletednearlyin180
TimeCCTVfeed,withinasecondofoccurrenceofviolenceoursy seconds(20secondsfasterthanruntimeofvideo).WithInteli5pro
steminabledetect theviolenceandraiseanalert. cessorFig.2,theprocessingofentirevideoisbeingdonenearlyin1
40seconds(1minutefasterthanruntimeofvideo).Witheachdete
ctionofviolenceoutbreak,
1471
thecorrespondingtimetakenbythesystemtodetectthatisbeingsh maximumaccuracy.Themaximumobtainedisnearly96%andmini
own. mumaccuracyisof73%.
4.2. Accuracy
TheaccuracyobtainedbyViF’s[1]asglobalfeaturesusingali
nearSVMis81.30%forexistingsystem.Proposedsystemhasana
ccuracyofnearly85%.
Figure5.AccuracyObtainedbytrainingwith70%ofdataandtestingwith30%ofdata
p n
Figure3.BarPlotofObtainedAccuracyValuesinNFolds P 33 2
N 5 32
TABLE1.C ONFUSION MATRIXFOR 70:30 DATASET
ThebargraphinFig.3showstheresultofN-foldscross
verificationwithN=7.Therearetotal5runs(executionofn- Thedatasetwhichcontains246videosisdividedintheratioof
foldsonceinarun).Ineachrunweconsider7heapsin 70:30.70%ofthedataisusedtotraintheneural
total.Eachheapcontainingequalnumberofvideos.Among net,30%ofthedataisusedtotesttheaccuracyofgeneratedmodel.
thesevideosviolentandnon- OutputinFig.5showsthattheaccuracyobtainedis90.27%.Aswe
violentvideosaredistributedevenly.ViolentandNonViolentvid canseetheconfusionmatrixinTable1,thenumberofFalseNegati
eosareplacedrandomlyinheaps.Thisgivesusanideahowrobustt vesarejust2,thatmeansthereareonly2casesinthetestsetwhichar
heproposedsystemis.Theminimumaccuracyweobtainforahea eactuallyviolentbutoursystemwasnotabletodetectit.Whereast
pinanyrunisgreaterthan70%. herewere5casesinwhichvideoswerenotviolentbutoursystemd
etectedsomeviolence.
Followingaretheresultsobtained:
• Accuracy=TP/(total)=0.9027
• TruePositiveRate=TP/(Positives)=0.9428
• Precision=TP/(Predictedyes)=0.8684
• Specificity=TN/(Actualno)=0.8648
• MisclassificationRate=(FP+FN)/(total)=0.097
Theaboveaccuracytestsweredoneonadataset[1]containing
246videos.ShortestVideoisof1secondandLongestVideoisof6s
econds.Thesecollectionsofvideoshaveequalnumberofviolent
andnon-
violentvideos.Thiskindofdatasetisknownas”inthewild”datase
t.VideospresentinthedatasetareofstandardCCTVresolution(sc
ale
Figure4.LinePlotofObtainedAccuracyValuesinNFolds =240:320)andofsimilaraspectratio(3:4).
5. ResultsandDiscussion
Fig.4showsthelinegraph,itissame asFig. Considerthefollowingscenesobtainedthroughsurveillance
4,butgivesustheclearpictureofaccuraciesofeachsetinitscorres footage:
pondingrun.Eachrunhasbeenassignedadifferentcolor.Fromthi
swecanclearlyidentifytheminimumand
1472
Figure6.ViolenceNotstarted Figure9.Violencefuriouslystarted
Aboveare4figureswhichshowfourdifferentphasesofsurvei
llancevideo.InitiallyinFig.6,Violencehasnotyetstarted.InFig.7
Violenceisabouttostart,peopleareslightlypushingeachother.Fi
g.8showsthestartofviolenceandinFig.9Violencehasstartedfuri
ously.
Figure7.Violenceabouttostart
Figure10.TerminalOutputforthevideo
InFig.10,itshowstheoutputofthesystemfortheparticularvid
eoshowninpreviousfigures.Aswecanseefortheinitialframe,out
putvalueisveryless,asthescenegets tense in Fig. 7, the system
output value increases. When
theviolencestartsinFig.9,outputvalueincreasesto0.999
indicatingviolence.Lateroninthevideoviolencedecreases
graduallyandhencetheoutputvaluefallsdownto0.06.
6. ConclusionandFurtherWork
Timelydetectionofviolenceinrealtimeisofmuchimportanc
e.System’sabilitytodetectviolencewithinasecondisimportantb
ecausethedifferencebetween
thetimeofoccurrenceandthetimeofdetectionmaybethe
differencebetweenlifeanddeath.Resultshaveshownthatsystem
Figure8.Violenceslightlystarted isperformingfastenoughtodetectoutbreaksinrealtime.Thissyst
em’slearningcapabilitiesandaccuracycanbefurtherimprovedt
hroughAdaBoost.Whateverworkhasbeendoneistogiveattentio
nandimportancetoaccuraterealtimesurveillance.Thissystemof
coursemaynotreplacehumansattheirjobbutwillgreatlyreducet
heburdenon
1473
them.Thiswillgivehumanstheabilitytomonitormultipleareasatatim
e.
Furthertheaccuracycanbegreatlyimprovedbyusingtheresu
ltsofFeatureSelectionalgorithmofAdaBoost[4].
Asexplainedabove,oncewearrangethefeaturesinincreas-
ingorderoftheirerrorrate,wegetorderofimportanceof
336features.Inthatparticularorder,wecanassociatetheweights
ofinputlayerinneuralnet.Thefeatureswhichare
highlyimportantcanhaveahigherweightattheirinputnodeandas
theimportancedecreases,weightscanalsobedecreased.Thisma
ymakeadifferenceinincreasingtheaccuracyofneuralnet.
Acknowledgments
WewouldliketothankDr.THassner[1]forhiscon-
tributionstowardsrealtimesurveillance,thisprojectwouldnotha
vebeenpossiblewithoutthegenerationofViolentFlowDescripto
rs(VIFs).
References
[1]T.Hassner,Y.Itcher,O.KliperGross.ViolentFlows:Real-
TimeDetectionofViolentCrowdBehavior,3rdIEEEInternationalWork-
shoponSocially Intelligent Surveillanceand Monitoring
(SISM)attheIEEEConf.onComputerVisionandPatternRecognition(CV
PR),June2012
[2]Ce.Liu.BeyondPixels:ExploringNewRepresentationsandApplica-
tionsforMotionAnalysis,MassachusettsInstituteofTechnology,Ph.D.
Thesis,2009
[3]Anjos,AndréANDElShafey,LaurentANDWallace,RoyAND Günther,
ManuelAND McCool,Christopher ANDMarcel, Sébastien.
Bob:afreesignalprocessingandmachinelearningtoolboxforre-
searchers,20thACMConferenceonMultimediaSystems(ACMMM),
NaraJapan,2012
[4]RuihuWang.AdaBoostforFeatureSelection,ClassificationandItsRelationw
ith SVM,A Review, Department ofScienceand
TechnologyChongqingUniversityofArtsandSciencesYongchuan,Chon
gqing402160,CHINA
[5]MartnAbadi,AshishAgarwal, Paul Barham,EugeneBrevdo,
ZhifengChen,CraigCitro,GregS.Corrado,AndyDavis,JeffreyDean,Mat
thieuDevin,SanjayGhemawat,IanGoodfellow,AndrewHarp,GeoffreyIr
ving,MichaelIsard,RafalJozefowicz,YangqingJia,LukaszKaiser,Manju
nathKudlur,JoshLevenberg,DanMan,MikeSchuster,RajatMonga,Sherr
yMoore,DerekMurray,ChrisOlah,JonathonShlens,BenoitSteiner,IlyaS
utskever,KunalTalwar,PaulTucker,VincentVanhoucke,VijayVasudevan,
FernandaVigas,OriolVinyals,PeteWarden,MartinWattenberg,MartinWi
cke,YuanYu,andXiaoqiangZheng.TensorFlow:Large-
scalemachinelearningonheterogeneoussystems,2015.Sourceavailablea
thttps://www.tensorflow.org
[6] Chollet,Françoisandothers.Keras,2015.Sourceavailableathttps:
//keras.io
[7]
Itseez.OpenSourceComputerVisionLibrary,2015.Sourceavailableathttp
s://github.com/itseez/opencv
1474