A Python project for segmenting and analyzing solar coronal structures using deep learning.
Includes a Flask API backend and a client for interacting with the service.
- Deep learning segmentation of solar images (Active Regions, Coronal Holes)
- REST API for predictions and analysis
- Image preprocessing, disk detection, and region analysis
- Returns annotated images and statistics
-
Clone the repository:
git clone https://github.com/yourusername/your-repo.git cd your-repo -
Install Python dependencies:
pip install -r requirements.txt
-
(Optional) Install client dependencies (if using React/JS):
cd client npm install
- Start the back-end service:
cd service python service/app.py
The API will be available at http://localhost:5000.
- Start the FITS conversion service:
cd service python service/conver_fits.py
The API will be available at http://localhost:5500.
- Use the client to interact with the API:
- If using a web client, run:
cd flask-client npm start
- If using a web client, run:
- POST /predict
Send a JSON payload with image data and parameters to get segmentation results. Example request:
{
"tasktype": "AR",
"threshold": "medium",
"image": "<base64-encoded PNG>",
"instrument": "AIA",
"date": "2024-06-01",
"time": "12:00:00"
}
}Place pre-trained model files in service/models/ as required by app.py. Two models are needed, one for Active Regions (AR) and one for Coronal Holes (CH).