Skip to main content

Real-Time Vehicle Detection and Tracking Using YOLOv8 and BoT- SORT for Traffic Surveillance

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

Real-Time Vehicle Detection and Tracking Using YOLOv8 and BoTSORT for Traffic Surveillance

1Department of Artificial Intelligence & Machine Learning, Deogiri Institute of Engineering & Management Studies, Chhatrapati Sambhajinagar, Maharashtra, India

2Department of Computer Science & Engineering, G.H.Raisoni International Skill Tech University, Pune, Maharashtra, India ***

Abstract - With the rapid growth of urban traffic, there is an increasing need for efficient and automated monitoring systemsinintelligenttransportationapplications.Inthiswork, a real-time vehicle detection and tracking framework is presentedusingtheYOLOv8objectdetectionmodelintegrated with the BoT-SORT multi-object tracking algorithm. The system processes traffic surveillance video streams to detect vehicles and assign unique tracking IDs, ensuring continuity across consecutive frames. The YOLOv8 model provides reliable detection performance, while BoT-SORT enhances tracking by maintaining identity even under occlusion and motion variations. Experimental observations show that the proposed system can effectively detect and track multiple vehicles in real-world traffic scenarios. The approach is computationally efficient and suitable for practical traffic monitoring applications.

Key Words: YOLOv8, BoT-SORT, Vehicle Detection, Object Tracking, Traffic Surveillance, Deep Learning, Computer Vision, Intelligent Transportation Systems

1. INTRODUCTION

The rapid increase in the number of vehicles due to urbanization has created significant challenges in traffic monitoring and management. Efficient surveillance is essential to ensure road safety and reduce congestion. Traditional methodsrelyon manual observation,whichis notonlytime-consumingbutalsodifficulttoscaleforlarge urbanenvironments.

Recentadvancementsincomputervisionanddeeplearning haveenabledautomatedsolutionsfortrafficanalysis.Object detectionmodelssuchasYOLO(YouOnlyLookOnce)have demonstrated high accuracy and real-time performance, makingthemsuitableforapplicationsintrafficsurveillance. Inaddition,multi-objecttrackingtechniquesplayacrucial roleinmaintainingtheidentityofdetectedvehiclesacross consecutive frames, allowing continuous monitoring of vehiclemovement.

Vehicle detection alone is insufficient for understanding trafficdynamics,asitonlyprovidesinformationatasingle framelevel.Toaddressthislimitation,trackingalgorithms suchasBoT-SORTareemployedtoassociatedetectionsover time and assign unique identifiers to each vehicle. This

enables consistent tracking even in the presence of occlusionsandvaryingmotionpatterns.

In this paper, a real-time vehicle detection and tracking frameworkisdevelopedusingYOLOv8andBoT-SORT.The systemprocessesvideostreamsandtracksvehiclesacross frameswithconsistentidentityassignment.Theapproachis simple, efficient, and suitable for practical deployment in trafficsurveillancescenarios.

Themaincontributionsofthisworkareasfollows:

 Implementation of a real-time vehicle detection systemusingYOLOv8

 Integration of BoT-SORT for robust multi-object tracking

 Development of a complete pipeline for traffic surveillanceapplications

Theremainderofthepaperisorganizedasfollows:Section2 presents the literature review, Section 3 describes the proposed methodology, Section 4 discusses the dataset, Section5explainsimplementationdetails,Section6presents resultsanddiscussion,andSection7concludesthepaper.

2. LITERATURE REVIEW

Recent advancements in computer vision and deep learning have significantly improved the performance of vehicledetectionandtrackingsystemsintrafficsurveillance applications.Variousobjectdetectionmodelsandtracking algorithmshavebeenexploredintheliteraturetoaddress challengessuchasocclusion,varyingillumination,andrealtimeprocessing.

Earlyobjectdetectionapproachesreliedonregion-based methodssuchasFasterR-CNN,whichprovidedhighaccuracy but suffered from computational complexity, limiting realtimeapplicability[3].Toovercometheselimitations,singlestage detectors such as YOLO were introduced, offering a balance between speed and accuracy for real-time object detectiontasks[1].Similarly,theSSD(SingleShotMultiBox Detector) model improved detection efficiency while maintainingcompetitiveaccuracy[2].

Recent improvements in the YOLO family, including YOLOv4 and YOLOv7, have further enhanced detection performance through architectural optimizations and training strategies [4], [5]. The latest version, YOLOv8,

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

providesimprovedaccuracyandefficiency,makingitsuitable forreal-timetrafficsurveillanceapplications[18].

Inthedomainofvehicledetection,severalstudieshave focused on applying deep learning models for parking detection and traffic monitoring. Amato et al. proposed a decentralizeddeeplearningapproachforparkingoccupancy detectionusingsurveillanceimages[6].Yinetal.developeda deep learning-based parking detection system capable of identifying parking spaces in real-time scenarios [7]. Similarly, Tang et al. utilized SSD for real-time parking detection,demonstratingimproveddetectionspeed[8].

Beyond detection, tracking algorithms are essential for maintaining object identity across frames. The SORT algorithmintroducedasimpleyeteffectiveapproachforrealtimetrackingbasedonKalmanfilteringanddataassociation [14]. DeepSORT extended this approach by incorporating appearance features for improved tracking performance under occlusion conditions [12]. More recently, ByteTrack demonstrated enhanced tracking accuracy by associating both high and low confidence detections, improving robustnessincrowdedscenes[13].

BoT-SORT,anextensionofByteTrack,furtherimproves trackingperformancebyintegratingmotionandappearance cues,makingithighlyeffectiveformulti-objecttrackingin complexenvironments[13].Thesetrackingmethodsenable continuous monitoring of vehicles and are widely used in intelligenttrafficsystems.

Vehicle behavior analysis has also gained attention in recentstudies.Lietal.exploredvehiclebehaviormodeling usingtrackingandmachinelearningtechniques,highlighting the importance of temporal information in traffic analysis [11].Moetal.proposedevent-baseddetectionmethodsfor trafficsurveillance,emphasizingtheroleoftemporalfeatures inidentifyingcomplextrafficevents[15].

Furthermore, several recent works have combined detection and tracking for traffic monitoring applications. Sharmaetal.integratedYOLO-baseddetectionwithtracking algorithms for vehicle monitoring in urban environments [16].Zhaoetal.proposedattention-baseddetectionmethods to improve accuracy in traffic scenes [17]. Luz et al. developed a YOLO-based smart parking system for automatedparkingdetection[10].Kathaitetal.presenteda comprehensive review of deep learning approaches for parkingdetection,highlightingcurrentchallengesandfuture directions[18].

MachinelearningtechniquessuchasRandomForesthave also been widely used for classification tasks in traffic analysis due to their robustness and interpretability [19]. Bishop’s work on pattern recognition provides a strong theoretical foundation for machine learning-based approachesincomputervisionapplications[20].

Despite significant progress, challenges remain in achievingrobustreal-timeperformanceundervaryingtraffic conditions.Theintegrationofefficientdetectionmodelssuch

asYOLOv8withadvancedtrackingalgorithmslikeBoT-SORT provides a promising solution for real-time vehicle monitoringinintelligenttransportationsystems.

3. PROPOSED SYSTEM

Figure 1 illustrates a comprehensive framework for vehicle detection and tracking by integrating the YOLOv8 object detection algorithm with a multi-object tracking mechanism.Theoverallprocessisdividedintothreemain components:detection,tracking,andoutputgeneration.

On the leftside, the YOLOv8algorithm is employed for objectdetection.Theprocessbeginswithadoptingpublicly availabledatasetsfortraining,followedbythedevelopment ofanimprovedYOLOv8-basedmodel.Themodelistrained using the MS COCO dataset and is capable of detecting vehicles in input video frames. The output of this stage consists of bounding boxes corresponding to detected vehicles.

In the central pipeline, the system processes the input video by performing object detection on each frame. The detected objects are then passed to the tracking module, wheretargettrackingisperformed.Thesystemoutputsthe numberoftrackedvehiclesbasedonconsistentdetections acrossframes.

Ontherightside,thetrackingprocessisillustratedusing aBoT-SORT-basedapproach.Thetrackingmoduleextracts deepfeaturesfromdetectedobjectsandutilizesbothmotion andappearanceinformationtoimprovetrackingaccuracy.It applies motion prediction techniques such as the Kalman filter along with data association methods to associate detectionsacrossconsecutiveframes.Thisensuresthateach vehicleisassignedaconsistentidentityeveninthepresence of occlusions and dynamic scene variations. Finally, the trackingstatesareupdated,andtheresultsaregeneratedas output.

Fig -1:IntegratedVehicleDetectionandTracking FrameworkusingYOLOv8andBot-SORT

Overall, the framework combines deep learning-based detectionwithrobusttrackingalgorithmstoachieveaccurate and real-time vehicle monitoring in traffic surveillance scenarios.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

Theproposedsystemaimstoperformreal-timevehicle detection and tracking in traffic surveillance videos by integrating a deep learning-based object detection model with a robust multi-object tracking algorithm. The overall framework consists of sequential stages including frame extraction,vehicledetection,tracking,andtrajectoryanalysis.

3.1 System Overview

Figure 2 illustrates the workflow of the proposed system, where the input video is processed frame-by-frame for vehicle detection using YOLOv8, followed by multi-object trackingusingBoT-SORTtoassignuniqueIDsandgenerate vehicletrajectories.

Thesystemprocessesinputvideostreamscapturedfrom trafficsurveillancecameras.Eachvideoisdecomposedinto individual frames, which are then analyzed using a deep learningmodelforvehicledetection.Thedetectedvehicles are subsequently tracked across frames using a tracking algorithmtomaintainidentityconsistency.

3.2 Frame Extraction

The input video is processed frame-by-frame using OpenCV.Eachframerepresentsasnapshotofthetrafficscene and is used as input for the detection module. This step ensurescontinuousprocessingofthevideostreamforrealtimeanalysis.

3.3 Vehicle Detection using YOLOv8

Vehicle detection is performed using the YOLOv8 (You OnlyLookOnceversion8)objectdetectionmodel.YOLOv8is a one-stage detector that processes the entire image in a singleforwardpass,enablingreal-timeperformance.

The model is pre-trained on the COCO dataset and configured to detect relevant vehicle classes such as cars,

buses,andtrucks.Eachdetectedvehicleisrepresentedbya boundingboxalongwithitsspatialcoordinates.

3.4 Multi-Object Tracking using BoT-SORT

Tomaintaintemporalconsistencyacrossframes,theBoTSORTtrackingalgorithmisemployed.Thetrackerassignsa uniqueidentifier(ID)toeachdetectedvehicleandupdatesit acrossconsecutiveframes.

BoT-SORT utilizes motion and spatial information to associatedetectionsbetweenframes,ensuringthatthesame vehicle is consistently tracked even in the presence of occlusionormovementvariations.

3.5 Trajectory Generation

Themovementofeachtrackedvehicleisrecordedacross framestogeneratetrajectories.Thesetrajectoriesrepresent thepathfollowedbyeachvehiclewithinthesceneandcanbe usedforfurthertrafficanalysis.

Eachvehicleobservationcanberepresentedas: (1) where t istheframeindex, id isthetrackingidentifier,and (xt ,yt) denotesthecentroidpositionofthevehicle.

3.6 System Workflow

Theoverallworkflowoftheproposedsystemissummarized asfollows:

 Inputtrafficvideo

 Frameextraction

 VehicledetectionusingYOLOv8

 Multi-objecttrackingusingBoT-SORT

 IDassignmentandtrajectorygeneration

4. EXPERIMENTAL SETUP

The experimental setup is designed to evaluate the performanceoftheproposedvehicledetectionandtracking system in real-world traffic surveillance scenarios. The system is implemented using Python and executed on a standardcomputingenvironment.

4.1 Hardware and Software Configuration

Theproposedsystemisimplementedonamachinewiththe followingconfiguration:

 Processor:IntelCorei5/i7

 RAM:8GBorhigher

 OperatingSystem:Windows10

 ProgrammingLanguage:Python3.x

 Libraries:UltralyticsYOLOv8,OpenCV

The experiments are conducted using the Ultralytics implementation of YOLOv8 for object detection and BoTSORTformulti-objecttracking.

Fig -2:Systemarchitectureoftheproposedvehicle detectionandtrackingframework

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

4.2 Dataset Description

The dataset used in this study consists of real-world trafficsurveillancevideos.Thevideosrepresenturbantraffic environments with moderate vehicle density and varying motionpatterns.

 Videoformat:AVI/MP4

 Resolution:1280×720pixels

 Framerate:25–30FPS

 Scenetype:Urbanroadtraffic

Due to privacy constraints, the dataset is not publicly shared.However,publiclyavailabletrafficvideosfromonline repositoriescanalsobeusedforevaluation.

4.3

Implementation Details

The proposed system processes input video streams frame-by-frame.EachframeispassedthroughtheYOLOv8 modeltodetectvehiclessuchascars,buses,andtrucks.The detectedobjectsarethentrackedacrossconsecutiveframes usingtheBoT-SORTalgorithm,whichassignsuniqueIDsto maintaintemporalconsistency.

Onlyrelevantvehicleclassesareconsideredtoimprove efficiencyandreducenoise.Thesystemoperatesinreal-time andgeneratesoutputintheformofannotatedvideoframes withboundingboxesandtrackingIDs.

4.4 Evaluation Criteria

Theperformanceofthesystemisevaluatedbasedonthe followingcriteria:

 Detection accuracy (correct identification of vehicles)

 Tracking consistency (maintenance of unique IDs acrossframes)

 Real-time performance (processing speed and responsiveness)

The qualitative results are analyzed through visual inspectionofdetectionandtrackingoutputs.

5. RESULTS AND DISCUSSION

Theproposedsystemwastestedonreal-worldtrafficvideos toevaluateitsperformanceunderpracticalconditions.The combination of YOLOv8 and BoT-SORT enables accurate detection and stable tracking of multiple vehicles across frames.

5.1 Detection and Tracking Performance

The output of the proposed system is illustrated in Fig. 3, where multiple vehicles are successfully detected and assigneduniquetrackingIDs.Thesystemdemonstratesthe ability to handle multiple vehicles simultaneously while maintainingidentityconsistencyacrossconsecutiveframes. It can be observed that vehicles moving in different

directionsandatvaryingspeedsarecorrectlyidentifiedand trackedwithoutsignificantlossofidentity.

The results indicate that the YOLOv8 model effectively detectsvehiclessuchascarsandtrucks,whiletheBoT-SORT algorithm ensures robust tracking even under moderate trafficdensity.TheassignedtrackingIDsremainconsistent, indicating stable tracking performance. Additionally, the system performs reliably even in slightly complex scenes, where multiple vehicles are present in close proximity, highlightingitscapabilityforreal-worldtrafficsurveillance applications.

5.2 Graphical Analysis

Tofurtheranalyzesystemperformance,threegraphswere generatedrepresentingvehicledetection,trackingbehavior, andprocessingspeedacrossframes.

Vehicle Count Analysis

The variation in the number of detected vehicles across framesisshowninChart1.

Chart -1:Numberofdetectedvehiclesversusframe number

Thegraphshowsthatthenumberofdetectedvehiclesvaries between 8 and 20 across frames, with an average of

Fig -3:Outputoftheproposedsystemshowingreal-time vehicledetectionandtrackingwithuniqueIDsassignedto eachdetectedvehicle

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

approximately13vehicles.Thisvariationreflectsreal-world trafficconditionswherevehicledensitychangesovertime.

Tracking Consistency Analysis

The number of active tracking IDs across frames is illustratedinChart2. Thegraphcloselyfollowsthevehiclecounttrend,indicating that each detected vehicle is successfully assigned and maintained with a unique ID. This demonstrates the effectiveness of the BoT-SORT tracking algorithm in maintainingidentityconsistency.

Chart -2:NumberofactivetrackingIDsversusframe number

Processing Speed Analysis

Theprocessingspeedofthesystemintermsofframesper second(FPS)isshowninChart3.

Chart -3:Processingspeed(FPS)versusframenumber

Thesystemmaintainsanaverageprocessingspeed ofapproximately6.96FPS,withminorfluctuationsdueto variationsinscenecomplexityandobjectdensity.Occasional dropsinFPSareobservedduringframeswithhighervehicle density,whichisexpectedinreal-timeprocessingsystems.

5.3 Quantitative Performance Evaluation

AsummaryofthesystemperformanceispresentedinTable 1.Theresultsindicatethatthesystemperformsconsistently across frames, accurately detecting and tracking vehicles whilemaintainingreal-timeprocessingcapability.Theclose similaritybetweentheaveragevehiclecountandtracking IDs confirms that the tracking algorithm effectively preserves object identity. Furthermore, the system maintains a balanced performance across varying traffic conditions, demonstrating its robustness in real-world scenarios. The consistent relationship between detection andtrackingresultshighlightsthereliabilityoftheoverall framework.

Table -1: PerformanceAnalysisofProposedSystem Metric

5.4 Discussion

Theresultsindicatethatthesystemperformsconsistentlyin moderatetrafficconditions.ThetrackingIDsremainstable across frames, showing that the tracking algorithm works effectively.AlthoughsomefluctuationsinFPSareobserved, thesystemstilloperatesatnearreal-timespeed.

Thesystemiscapableofhandlingmoderatetrafficdensity whilemaintainingstabletrackingandacceptableprocessing speed.AlthoughminorfluctuationsinFPSareobserved,the systemremainssuitablefornearreal-timeapplications.The approachcanbefurtherimprovedbyoptimizinghardware resources or using more lightweight models for faster inference.

Overall,theproposedsystemprovidesaneffectivesolution forautomatedvehiclemonitoringintrafficsurveillanceand can be extended for advanced applications such as traffic analysisandsmartcitymanagement.

6. CONCLUSION

In this work, a real-time vehicle detection and tracking system has been developed using YOLOv8 and BoT-SORT. The system is capable of detecting multiple vehicles and maintaining consistent tracking across frames. The experimentalresultsshowthattheapproachperformswell in real-world traffic scenarios with stable tracking and acceptableprocessingspeed.Thesystem canbeusefulfor traffic monitoring and smart city applications. Future improvementscanfocusonincreasingprocessingspeedand extending the system for advanced applications such as behavioranalysisandillegalparkingdetection.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

REFERENCES

[1] J.Redmon,S.Divvala,R.Girshick,andA.Farhadi,“You OnlyLookOnce:Unified,Real-TimeObjectDetection,”in Proc. IEEE Conf. Computer Vision and Pattern Recognition(CVPR),2016.

[2] W.Liu,D.Anguelov,D.Erhan,C.Szegedy,andS.Reed, “SSD:SingleShotMultiBoxDetector,”inProc.European Conf.ComputerVision(ECCV),2016.

[3] S. Ren, K. He, R. Girshick, and J. Sun, “Faster R-CNN: Towards Real-Time Object Detection with Region ProposalNetworks,”inAdvancesinNeuralInformation ProcessingSystems(NeurIPS),2015.

[4] A.Bochkovskiy,C.-Y.Wang,andH.-Y.M.Liao,“YOLOv4: OptimalSpeedandAccuracyofObjectDetection,”2020.

[5] C.-Y.Wang,A.Bochkovskiy,andH.-Y.M.Liao,“YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art,” 2022.

[6] G.Amato,F.Carrara,F.Falchi,C.Gennaro,andC.Vairo, “Deeplearningfordecentralizedparkinglotoccupancy detection,”ExpertSystemswithApplications,vol.72,pp. 327–334,2017.

[7] X.Yin,X.Wang,andZ.Liu,“Deeplearning-basedparking detection system,” IEEE Access, vol. 7, pp. 123–134, 2019.

[8] Z. Tang, H. Wang, and Y. Zhang, “Real-time parking detectionusingSSD,”inProc.IEEEConf.,2020.

[9] R.Luz,J.Silva,andP.Rocha,“YOLO-basedsmartparking detectionsystem,”2024.

[10]S. Kathait, A. Singh, and R. Kumar, “Deep learning approachesforparkingdetection:Areview,”2025.

[11]Y.Li,X.Zhang,andH.Chen,“Vehiclebehavioranalysis usingtrackingandmachinelearning,”IEEEAccess,vol. 9,pp.45678–45689,2021.

[12]N.Wojke,A.Bewley,andD.Paulus,“SimpleOnlineand Realtime Tracking with a Deep Association Metric (DeepSORT),”2017.

[13]Y.Zhang,P.Sun,Y.Jiang,andD.Yuan,“ByteTrack:MultiObject Tracking by Associating Every Detection Box,” 2022.

[14]A.Bewley,Z.Ge,L.Ott,F.Ramos,andB.Upcroft,“Simple OnlineandRealtimeTracking(SORT),”inProc.IEEEInt. Conf.ImageProcessing,2016.

[15]L. Mo, Q. Wang, and Y. Liu, “Mask-SpyNet for event detectionintrafficsurveillance,”2022.

[16]Sharma, P. Gupta, and R. Verma, “YOLOv8 with DeepSORT for vehicle tracking in traffic surveillance,” 2023.

[17]Z. Zhao, X. Li, and Y. Chen, “Attention-based YOLO for trafficmonitoring,”2024.

[18]Ultralytics,“YOLOv8Documentation,”2023.

[19]L.Breiman,“Randomforests,”MachineLearning,vol.45, no.1,pp.5–32,2001.

[20]M.Bishop,PatternRecognitionandMachineLearning. Springer,2006.

[21]T.Hastie,R.Tibshirani,andJ.Friedman,TheElementsof StatisticalLearning.Springer,2009.

Turn static files into dynamic content formats.

Create a flipbook
Real-Time Vehicle Detection and Tracking Using YOLOv8 and BoT- SORT for Traffic Surveillance by IRJET Journal - Issuu