Skip to content

Hack-02: LFMs with Eyes ๐Ÿ‘€ is focused on implementing our recently announced LFM2-VL models into exciting edge applications that may not be possible with larger models. We believe that there are a lot of capabilities unlocked by giving applications an understanding of their surroundings.

Notifications You must be signed in to change notification settings

meghahonna/LiquidHack-02

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿญ Industrial Process Monitoring - Streamlit Web UI

A clean and professional web interface for real-time industrial process monitoring with AI-powered anomaly detection.

๐ŸŒŸ Features

๐ŸŽ›๏ธ Real-time Monitoring Dashboard

  • Start/Stop Controls - Easy monitoring control with visual status indicators
  • Live Data Generation - Synthetic data generated every 10 seconds
  • Auto-refresh Interface - Real-time updates without manual refresh
  • Clean, Professional UI - Modern design with intuitive layout

๐Ÿ“Š Interactive Visualizations

  • Real-time Sensor Plots - Interactive Plotly charts for temperature and pressure
  • Multi-panel Analysis - Complete industrial process visualization
  • Live Data Updates - Charts update automatically with new data

๐Ÿค– AI-Powered Analysis

  • Automatic Anomaly Detection - AI analysis runs with each cycle
  • New Trends Alerts - Visual notifications when new patterns are detected
  • Detailed Analysis Reports - Full AI insights with expandable view
  • Quick Summaries - Key findings highlighted for rapid assessment

๐Ÿ“ˆ System Monitoring

  • Activity Log - Real-time status messages and system events
  • Cycle Counter - Track monitoring cycles and intervals
  • System Metrics - Current data counts and update timestamps
  • Error Handling - Graceful error reporting and recovery

๐Ÿš€ Quick Start

1. Install Dependencies

pip install -r requirements.txt

2. Launch Web Interface

# Option 1: Using the launcher script
streamlit run streamlit_app.py

3. Access Dashboard

๐ŸŽฎ How to Use

Starting Monitoring

  1. Click "๐Ÿš€ Start Monitoring" button
  2. System begins generating data every 10 seconds
  3. Watch real-time updates in all panels
  4. AI analysis runs automatically with each cycle

Monitoring Interface

  • Left Panel: System status and activity log
  • Center Panel: Real-time data visualizations
  • Right Panel: AI analysis results and alerts

Stopping Monitoring

  1. Click "๐Ÿ›‘ Stop Monitoring" button
  2. Current cycle completes gracefully
  3. All generated data remains available
  4. Can restart monitoring anytime

๐Ÿ”ง Technical Details

Architecture

  • Frontend: Streamlit web framework
  • Backend: Python pipeline integration
  • Threading: Background monitoring worker
  • State Management: Streamlit session state
  • Visualization: Plotly interactive charts

Data Flow

  1. Background Thread runs monitoring cycles
  2. Data Generation creates synthetic industrial data
  3. Visualization generates analysis plots
  4. AI Analysis processes plots for anomalies using the LFM2-VL models
  5. UI Updates refresh automatically via session state

Performance

  • 10-second Cycles - Configurable monitoring interval
  • Automatic Archiving - All data preserved with timestamps
  • Memory Efficient - Background thread management
  • Error Recovery - Graceful handling of failures

๐Ÿ“Š Data Management

Real-time Generation

  • Events Data: Temperature, Pressure, Efficiency, Energy, COโ‚‚
  • Sensor Data: HeatExchanger01.S001, PumpStation01.S002
  • Time Series: 20 data points per cycle with 5-minute intervals

File Structure

data/
โ”œโ”€โ”€ events.csv                    # Latest event data
โ”œโ”€โ”€ sensors.csv                   # Latest sensor data
โ””โ”€โ”€ archive/                      # Timestamped archives

images/
โ”œโ”€โ”€ culprit_signals_analysis.png  # Latest visualization
โ””โ”€โ”€ archive/                      # Timestamped archives

analysis/
โ”œโ”€โ”€ analysis_report.txt           # Latest AI analysis
โ””โ”€โ”€ archive/                      # Timestamped archives

๐Ÿ› ๏ธ Troubleshooting

Common Issues

Port Already in Use

# Kill existing streamlit processes
pkill -f streamlit
# Or use different port
streamlit run streamlit_app.py --server.port 8502

Module Import Errors

# Install missing dependencies
pip install -r requirements.txt

AI Analysis Fails

  • Check MLX-VLM installation
  • Verify model download permissions
  • Ensure sufficient system memory

Performance Tips

  • Close unused browser tabs for better performance
  • Monitor system resources during continuous operation
  • Use Chrome/Firefox for best compatibility
  • Enable hardware acceleration in browser settings

๐Ÿ”— Integration

Pipeline Integration

  • Seamless: Uses existing pipeline modules
  • Non-intrusive: Doesn't modify core pipeline
  • Parallel: Can run alongside command-line tools
  • Compatible: Works with all existing features

API Potential

  • REST Endpoints: Could be extended with FastAPI
  • WebSocket: Real-time data streaming capability
  • Mobile App: Foundation for native mobile interface
  • Dashboard Embedding: Can be embedded in larger systems

๐Ÿ“ˆ Future Enhancements

Planned Features

  • Historical Data Viewer - Browse archived analyses
  • Custom Alerts - User-defined anomaly thresholds
  • Export Functions - Download reports and data
  • Multi-user Support - Role-based access control
  • Advanced Filtering - Data exploration tools

Technical Improvements

  • WebSocket Integration - True real-time updates
  • Database Backend - Persistent data storage
  • Caching Layer - Improved performance
  • Mobile Optimization - Enhanced mobile experience

๐ŸŽฏ Perfect For

  • Industrial Engineers - Real-time process monitoring
  • Data Scientists - Anomaly detection research
  • System Operators - Live system oversight
  • Managers - High-level process insights
  • Students - Learning industrial monitoring concepts

About

Hack-02: LFMs with Eyes ๐Ÿ‘€ is focused on implementing our recently announced LFM2-VL models into exciting edge applications that may not be possible with larger models. We believe that there are a lot of capabilities unlocked by giving applications an understanding of their surroundings.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages