Skip to content

Latest commit

 

History

History
200 lines (146 loc) · 4.42 KB

File metadata and controls

200 lines (146 loc) · 4.42 KB

Data Collection Guide for Slip Detection

Collection Strategy

Approach: Short Episodes

Collect short, labeled episodes of:

  • Normal contact (steady walking, standing)
  • Slip contact (intentional slips on slippery surfaces)

Each episode should be 2-5 seconds long, clearly labeled.


Data Collection Protocol

1. Normal Contact Episodes

What to collect:

  • Steady walking on dry, non-slip surfaces
  • Normal heel strikes
  • Standing still (optional, but good for baseline)
  • Walking at different speeds (slow, normal, fast)

Collection:

  • Record 10-20 episodes per session
  • Each episode: 2-5 seconds
  • Label: normal or 0

Example scenarios:

  • Walking on carpet
  • Walking on dry tile/wood
  • Walking on dry concrete
  • Normal stair climbing

2. Slip Contact Episodes

What to collect:

  • Intentional slips on slippery surfaces
  • Wet surfaces (wet tile, wet floor)
  • Icy surfaces (if available)
  • Oily/greasy surfaces
  • Loose surfaces (gravel, sand)

Collection:

  • Record 10-20 episodes per session
  • Each episode: 2-5 seconds (capture the slip event)
  • Label: slip or 1

Safety:

  • Use controlled environments
  • Have support nearby
  • Start with minor slips
  • Consider using a test rig/fixture if possible

Collection Workflow

Step 1: Prepare Collection Environment

  1. Set up Arduino with sensor on heel
  2. Run collection script:
    python collect_sensor_data.py --port COM3 --output data/collection_session_1.csv

Step 2: Collect Episodes

For each episode:

  1. Start recording (script is running)
  2. Perform action (walk normally OR create slip)
  3. Mark episode (press Enter or use keyboard shortcut - see script)
  4. Wait 1-2 seconds between episodes
  5. Repeat for 10-20 episodes

Step 3: Label Data

After collection, label your episodes:

python label_collected_data.py --input data/collection_session_1.csv --output data/labeled_session_1.csv

Episode Structure

Each episode should contain:

  • Pre-contact (0.5s before)
  • Contact event (main event - 1-2s)
  • Post-contact (0.5s after)

Total: ~2-3 seconds per episode


Recommended Dataset Size

Minimum for Testing:

  • Normal episodes: 50-100
  • Slip episodes: 50-100
  • Total: 100-200 episodes

Good Dataset:

  • Normal episodes: 200-300
  • Slip episodes: 200-300
  • Total: 400-600 episodes

Excellent Dataset:

  • Normal episodes: 500+
  • Slip episodes: 500+
  • Total: 1000+ episodes

Data Quality Tips

  1. Consistency: Use same sensor placement for all collections
  2. Variety: Collect different walking speeds, surfaces, conditions
  3. Balance: Equal number of normal and slip episodes
  4. Clean data: Avoid transitions between episodes in the same recording
  5. Mark clearly: Use the labeling tool to mark episode boundaries

Collection Scenarios

Scenario 1: Controlled Lab Environment

  • Wet tile floor
  • Oily surface
  • Icy surface (if available)
  • Best for: High-quality, labeled data

Scenario 2: Real-World Testing

  • Wet sidewalks
  • Slippery floors
  • Best for: Validation and edge cases

Scenario 3: Synthetic Slips

  • Drag foot intentionally
  • Quick lateral movements
  • Best for: Additional training data

Labeling Guidelines

Normal Contact (label = 0):

  • Steady, rhythmic heel strikes
  • Predictable impact patterns
  • Consistent amplitude
  • Regular timing

Slip Contact (label = 1):

  • Sudden high-frequency spike
  • Unusual force patterns
  • Irregular timing
  • Higher variance
  • Recovery adjustments (post-slip)

File Organization

data/
├── raw/
│   ├── session_1_normal.csv
│   ├── session_1_slip.csv
│   ├── session_2_normal.csv
│   └── session_2_slip.csv
├── labeled/
│   ├── labeled_session_1.csv
│   └── labeled_session_2.csv
└── training_data.csv  (combined, final dataset)

Next Steps After Collection

  1. Label episodes using labeling script
  2. Combine datasets from multiple sessions
  3. Split data: 80% training, 20% testing
  4. Train model: python train_model.py --data data/training_data.csv
  5. Validate on new, unseen data

Safety Reminders

⚠️ When collecting slip data:

  • Have support nearby
  • Use controlled environments
  • Start with minor slips
  • Stop if you feel unsafe
  • Consider using test fixtures/rigs for repeatability