radar-analysis / README.md
chenxingqiang
Optimize model loading and improve user experience
3228ab0

A newer version of the Gradio SDK is available: 5.46.0

Upgrade
metadata
title: Radar Analysis System
emoji: 📡
colorFrom: blue
colorTo: red
sdk: gradio
sdk_version: 3.50.0
app_file: app.py
pinned: false
license: mit
python_version: '3.11'
app_port: 7860
tags:
  - radar-analysis
  - defect-detection
  - deep-learning

Radar Image Analysis System

This Hugging Face Space provides an interactive interface for analyzing radar images using deep learning and signal processing techniques. The system can detect defects, analyze signal characteristics, and generate detailed reports.

Features

  • Defect Detection: Uses PaliGemma model to detect and localize defects in radar images
  • Signal Analysis: Analyzes key signal characteristics:
    • Amplitude analysis
    • Distribution range measurement
    • Attenuation rate calculation
    • Reflection count analysis
  • Report Generation: Creates detailed reports with visualizations
  • History Tracking: Maintains a history of analyzed images and findings

How to Use

  1. Upload a radar image using the interface
  2. Click "Analyze" to process the image
  3. View the detection results and analysis report
  4. Access previous analyses through the history feature

Setup Instructions

Local Development

  1. Clone this repository:

    git clone https://huggingface.co/spaces/xingqiang/radar-analysis
    cd radar-analysis
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Set up environment variables:

    • Create a .env file in the root directory
    • Add your Hugging Face token: HF_TOKEN=your_token_here
  4. Run the application:

    python app.py
    

Hugging Face Space Deployment

  1. Fork this repository to your Hugging Face account
  2. Set the HF_TOKEN secret in your Space settings
  3. Deploy the Space

Technical Details

  • Model: PaliGemma-3b fine-tuned for radar defect detection
  • Framework: PyTorch + Transformers
  • Interface: Gradio
  • Signal Processing: Custom algorithms for radar signal analysis

Environment Variables

The following environment variables need to be set in your Space:

  • HF_TOKEN: Your Hugging Face token for accessing the model
  • DATABASE_URL (optional): URL for the database connection

Troubleshooting

  • Memory Issues: The application will automatically switch to demo mode if there's not enough memory
  • Model Loading Errors: Check that your Hugging Face token has access to the required model
  • Image Processing Errors: Ensure uploaded images are in a supported format (PNG, JPG)

Requirements

See requirements.txt for the complete list of dependencies.

License

MIT License

Citation

If you use this system in your work, please cite:

@software{radar_analysis_system,
  title = {Radar Image Analysis System},
  author = {Chen, Xingqiang},
  year = {2024},
  publisher = {Hugging Face Spaces},
  url = {https://huggingface.co/spaces/xingqiang/radar-analysis}
}

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference