summaryrefslogtreecommitdiff
path: root/bjoern/videoanalyse/post_processing.py
diff options
context:
space:
mode:
authorNiclas Dobbertin <niclas.dobbertin@stud.tu-darmstadt.de>2023-10-04 12:33:39 +0200
committerNiclas Dobbertin <niclas.dobbertin@stud.tu-darmstadt.de>2023-10-04 12:33:39 +0200
commitd52ede0288a5db23563ec29f998a1ad26e8aec28 (patch)
treee5e73df1e5372ad450db93d48921ecc29d615c3a /bjoern/videoanalyse/post_processing.py
parentcb7f7b44140728990f99115863922dd1f96c5cfe (diff)
use LogParser in post_processing
Diffstat (limited to 'bjoern/videoanalyse/post_processing.py')
-rw-r--r--bjoern/videoanalyse/post_processing.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/bjoern/videoanalyse/post_processing.py b/bjoern/videoanalyse/post_processing.py
index e24edcf..bdf76c3 100644
--- a/bjoern/videoanalyse/post_processing.py
+++ b/bjoern/videoanalyse/post_processing.py
@@ -6,6 +6,7 @@ from pprint import pprint
import pandas as pd
import utils
+import LogParser
argparser = argparse.ArgumentParser(description="OCR-Logfile evaluation")
argparser.add_argument("vp_dir", help="Directory with all VPs")
@@ -17,12 +18,18 @@ all_vp = [x for x in data_path.iterdir() if x.is_dir()]
vp_results = []
for vp_path in all_vp:
+ log = LogParser.extract_activities(LogParser.get_log_data(vp_path))
+ log = LogParser.generate_log(log)
+ history = LogParser.get_history_db(vp_path)
+ log = LogParser.match_urls(history, log)
+ LogParser.write_logfile(vp_path, log)
+
video_path = next(vp_path.glob("*.mkv"))
ocr_path = vp_path / "analysis_results.csv"
- log_path = vp_path / f"{vp_path.stem}.csv"
+ log_path = vp_path / "logs.csv"
df = utils.combine_ocr_logs(video_path, ocr_path, log_path)
- df = df.fillna('')
+ df = df.fillna("")
df["vp_code"] = vp_path.stem
df = utils.calc_levenshtein_distance(df)