diff --git a/calibration.py b/calibration.py index 6e87e2e..19de2a3 100644 --- a/calibration.py +++ b/calibration.py @@ -74,7 +74,7 @@ class Calibration: with tqdm(total=len(calibration_videos), desc=desc, position=0, ncols=self.progress_bar_cols) as outer_bar: for video in calibration_videos: - self.jamDetection.setCameraVideo(desc, video) + self.jamDetection.setCameraVideo(desc.split(": ")[1], video) self.calibrate_video(video, track) outer_bar.update(1) diff --git a/jam_detection.py b/jam_detection.py index a912240..f5b0ed2 100644 --- a/jam_detection.py +++ b/jam_detection.py @@ -20,14 +20,16 @@ class Jam_Detection: self.frame = 0 self.fps = 0 self.timestamp = None - self.snapshot_timer = 10 + self.snapshot_timer = 5 def clear_scores(self): self.score_list = [] def write_log(self, detections, car_ratio, jam_score): # Pfad zur Log-Datei - log_path = "jam_log.csv" + print(self.camera) + log_path = f"jam_log_{self.camera}.csv" + #log_path = "jam_log_.csv" # Prüfen, ob Datei existiert und leer ist file_exists = os.path.exists(log_path)