This directory contains all data files, datasets, and evaluation results in an organized structure.
data/
├── datasets/ # Ground truth and training datasets
│ ├── ml_dataset.csv # Main ground truth dataset
│ └── cooking_actions_log.csv # Recording session logs
├── sample_videos/ # Sample/test videos for evaluation
│ └── README.md # Video usage instructions
└── results/ # Evaluation outputs and analysis results
├── classification_result.txt # Example log file
├── classification_result_timeline.log # Example timeline
├── action_timeline.png # Visualization
└── cooking_actions_recording.mp4 # Example recording
Ground truth dataset for evaluation
Contains labeled action segments for performance comparison:
action_label: Specific action (add-food, remove-lid, etc.)start_time_seconds: Action start timeend_time_seconds: Action end timeduration_seconds: Action durationvideo_filename: Source video file
Usage:
cd evaluation/
python3 extract_and_align_classifier.py logs.txt
# Automatically loads ../data/datasets/ml_dataset.csv for comparisonRecording session metadata
Generated by interactive recording sessions:
- Timestamped action labels
- Action categories and descriptions
- Video filenames and metadata
- Session information
Place your evaluation videos in sample_videos/ directory:
# Copy your videos
cp /path/to/your/videos/*.mp4 data/sample_videos/
# Run evaluation
cd evaluation/
python3 automate_evaluation.py --video-dir ../data/sample_videosSupported formats: .mp4, .avi, .mov, .mkv
Evaluation outputs are automatically saved here:
videoname_timestamp.log- Raw viam-server logsvideoname_timestamp.analysis.txt- Detailed performance analysisvideoname_timestamp_timeline.log- Extracted classification timeline
evaluation_results_timestamp.json- Complete evaluation summary- Cross-video performance metrics
- Aggregate statistics and recommendations
results/evaluation_20250611_120000/
├── video1_20250611_120001.log
├── video1_20250611_120001.analysis.txt
├── video2_20250611_120035.log
├── video2_20250611_120035.analysis.txt
└── evaluation_results_20250611_120000.json
Recording → sample_videos/ → Evaluation → results/
↓ ↓
datasets/ Comparison with
(ground truth) ground truth data
- Use
recording/tools to capture videos - Videos saved to
sample_videos/for evaluation - Action logs saved to
datasets/for ground truth
- Videos from
sample_videos/processed automatically - Results compared against
datasets/ml_dataset.csv - Outputs saved to
results/with timestamps
# Copy videos to sample directory
cp /path/to/new/videos/*.mp4 data/sample_videos/
# Or specify custom directory in evaluation
python3 automate_evaluation.py --video-dir /custom/path/to/videos# Update the ground truth dataset
cp new_ml_dataset.csv data/datasets/ml_dataset.csv
# Evaluation will automatically use updated ground truth# Remove old evaluation results (optional)
rm -rf data/results/evaluation_older_timestamp/
# Keep recent results for comparison
ls -la data/results/# Record videos directly to data directory
cd recording/
OUTPUT_DIR="../data/sample_videos" python3 record_rgb_interactive.py# Automated evaluation of all data
cd evaluation/
python3 automate_evaluation.py \
--video-dir ../data/sample_videos \
--output-dir ../data/results/evaluation_$(date +%Y%m%d_%H%M%S)import json
import pandas as pd
# Load evaluation results
with open('data/results/evaluation_results_timestamp.json') as f:
results = json.load(f)
# Load ground truth
gt_data = pd.read_csv('data/datasets/ml_dataset.csv')
# Integrate with your analysis pipeline...video_filename,action_label,start_time_seconds,end_time_seconds,duration_seconds
video1.mp4,add-food,15.2,18.4,3.2
video1.mp4,flip,25.1,28.3,3.2{
"timestamp": "2025-06-11T12:00:00",
"machine_id": "de6836af-05f6-4ff4-a067-8d18ac0f6495",
"videos": [...],
"summary": {
"total_detections": 25,
"overall_acceptance_rate": 85.2,
"avg_confidence_across_videos": 78.5
}
}