Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sd338/fractureai

This tool helps people upload X-rays to find broken bones. It uses a machine to mark where the breaks are and gives users marked pictures to download. A smart computer also helps people understand their broken bones and gives them advice.
https://github.com/sd338/fractureai

css cv2 flask gorq html javascript matplotlib npm numpy pandas pydantic python react scikit-learn torch torchvision ultralytics

Last synced: 4 days ago
JSON representation

This tool helps people upload X-rays to find broken bones. It uses a machine to mark where the breaks are and gives users marked pictures to download. A smart computer also helps people understand their broken bones and gives them advice.

Awesome Lists containing this project

README

        

# FractureAI 🩺✨

## Overview 🌟

**FractureAI** is a smart web application that helps doctors find and understand fractures in X-ray images. It uses advanced technology to analyze the images, highlight the broken bones, and create detailed reports about the fractures. This tool makes it easier for healthcare professionals to diagnose and treat patients quickly and accurately. FractureAI is user-friendly, allowing anyone to upload images and get instant results without needing technical knowledge.

## Features 🌈

- **User-Friendly Interface**: Simple design to upload and analyze images.
- **Fast Fracture Detection**: Uses YOLOv8 for quick identification of fractures.
- **Detailed Analysis Reports**: Generates reports with insights about detected fractures.
- **Supports Multiple Users**: Efficiently handles many users at once without delays.

## Project Structure πŸ“‚

Here's a quick look at how the project is organized:

```
FractureAI/
β”‚
β”œβ”€β”€ backend/ # Backend logic for the FractureAI project
β”‚ β”œβ”€β”€ app/ # Main backend application directory
β”‚ β”‚ β”œβ”€β”€ __init__.py # Makes the 'app' directory a package
β”‚ β”‚ β”œβ”€β”€ main.py # Main FastAPI application file
β”‚ β”‚ β”œβ”€β”€ api/ # API-related files (endpoints)
β”‚ β”‚ β”‚ β”œβ”€β”€ __init__.py # Makes the 'api' directory a package
β”‚ β”‚ β”‚ β”œβ”€β”€ endpoints.py # API route definitions for serving requests
β”‚ β”‚ β”œβ”€β”€ models/ # Model-related files
β”‚ β”‚ β”‚ β”œβ”€β”€ yolo.py # YOLO model integration and functionality
β”‚ β”‚ β”‚ β”œβ”€β”€ llama.py # LLAMA model integration and functionality
β”‚ β”‚ β”œβ”€β”€ core/ # Core application helpers and configs
β”‚ β”‚ β”‚ β”œβ”€β”€ config.py # Configuration settings for the backend
β”‚ β”‚ β”‚ β”œβ”€β”€ helpers.py # Helper functions used across the backend
β”‚ β”‚ β”œβ”€β”€ utils/ # Utility functions and classes
β”‚ β”‚ β”‚ β”œβ”€β”€ image_processing.py # Functions for image processing (loading, preprocessing)
β”‚ β”‚ β”‚ β”œβ”€β”€ database.py # Database-related utilities (if needed)
β”‚ β”‚ β”œβ”€β”€ static/ # Static files like images, CSS, JS
β”‚ β”‚ β”‚ └── sample_xray.jpg # Example sample X-ray image for testing
β”‚ β”œβ”€β”€ tests/ # Unit and integration tests for the backend
β”‚ β”‚ β”œβ”€β”€ test_api.py # Test cases for the API endpoints
β”‚ β”‚ β”œβ”€β”€ test_model.py # Test cases for model integration and outputs
β”‚
β”œβ”€β”€ huggingface/ # Hugging Face-specific logic for the project
β”‚ β”œβ”€β”€ spaces/ # Hugging Face Spaces deployment files
β”‚ β”‚ β”œβ”€β”€ app.py # Main script for deploying on Hugging Face Spaces
β”‚ β”‚ β”œβ”€β”€ requirements.txt # Dependencies required by Hugging Face Spaces
β”‚ β”œβ”€β”€ models/ # Hugging Face-related model files
β”‚ β”‚ β”œβ”€β”€ llama_model.py # Hugging Face LLAMA model handling
β”‚ β”œβ”€β”€ utils/ # Utility functions specific to Hugging Face
β”‚ β”‚ β”œβ”€β”€ helpers.py # Helper functions for Hugging Face usage
β”‚
β”œβ”€β”€ vercel/ # Vercel-specific logic for serverless backend
β”‚ β”œβ”€β”€ api/ # API files for Vercel deployment (serverless functions)
β”‚ β”‚ β”œβ”€β”€ index.py # Main handler for Vercel functions
β”‚ β”œβ”€β”€ config/ # Configuration files for Vercel
β”‚ β”‚ β”œβ”€β”€ vercel.json # Vercel configuration settings (routing, etc.)
β”‚ β”œβ”€β”€ utils/ # Utility functions for Vercel
β”‚ β”‚ β”œβ”€β”€ helpers.py # Vercel-specific helper functions
β”‚
β”œβ”€β”€ training/ # Model training and dataset management
β”‚ β”œβ”€β”€ datasets/ # Folder for datasets used for training models
β”‚ β”‚ β”œβ”€β”€ custom_data/ # Custom dataset for training the fracture detection models
β”‚ β”‚ β”‚ β”œβ”€β”€ images/ # Images used for training (input)
β”‚ β”‚ β”‚ β”œβ”€β”€ annotations/ # Annotations for the images (output)
β”‚ β”œβ”€β”€ scripts/ # Scripts to manage training, preprocessing, and evaluation
β”‚ β”‚ β”œβ”€β”€ preprocess.py # Preprocess images and annotations for training
β”‚ β”‚ β”œβ”€β”€ train_yolo.py # Script to train the YOLO model
β”‚ β”‚ β”œβ”€β”€ evaluate.py # Script to evaluate model performance after training
β”‚ β”œβ”€β”€ configs/ # Configuration files for training models
β”‚ β”‚ β”œβ”€β”€ yolo_config.yaml # YOLO model configuration file for training parameters
β”‚ β”œβ”€β”€ outputs/ # Model outputs (checkpoints, logs)
β”‚ β”‚ β”œβ”€β”€ model_checkpoints/ # Directory to store trained model checkpoints
β”‚ β”‚ β”œβ”€β”€ logs/ # Directory to store training logs
β”‚
β”œβ”€β”€ frontend/ # Frontend logic for FractureAI (Vercel/Vue/React)
β”‚ β”œβ”€β”€ public/ # Public assets (e.g., HTML, images)
β”‚ β”‚ β”œβ”€β”€ index.html # Main HTML page
β”‚ β”œβ”€β”€ src/ # Source code for the frontend components
β”‚ β”‚ β”œβ”€β”€ components/ # React components used in the app
β”‚ β”‚ β”‚ β”œβ”€β”€ ImageUploader.jsx # Component for uploading images
β”‚ β”‚ β”‚ β”œβ”€β”€ ResultsDisplay.jsx # Component for displaying results after image processing
β”‚ β”‚ β”œβ”€β”€ styles/ # Stylesheets for the app
β”‚ β”‚ β”‚ β”œβ”€β”€ App.css # Main stylesheet for the frontend
β”‚ β”‚ β”œβ”€β”€ App.jsx # Main React app component
β”‚ β”‚ β”œβ”€β”€ index.js # Entry point for React app
β”‚
β”œβ”€β”€ requirements.txt # Python dependencies for the entire project
β”œβ”€β”€ package.json # Node.js dependencies for the frontend
β”œβ”€β”€ README.md # Project documentation
β”œβ”€β”€ .gitignore # Git ignore file to exclude files from version control
└── LICENSE # Project license file
```

## Getting Started πŸš€

### Prerequisites πŸ“‹

Ensure you have the following installed:

- Python 3.7 or higher
- Node.js and npm
- A terminal or command prompt to run commands

### Installation πŸ› οΈ

1. Clone the project:
```bash
git clone https://github.com/yourusername/FractureAI.git
cd FractureAI
```

2. Install the necessary Python packages:
```bash
pip install -r requirements.txt
```

3. Start the backend server:
```bash
cd backend/app
python main.py
```

4. Start the frontend:
```bash
cd frontend
npm install
npm start
```

5. Open your browser and go to `http://localhost:5000` to use the app.

## Usage πŸ’‘

1. Upload an X-ray image using the upload feature.
2. Click the "Analyze X-ray" button to check the image.
3. View the results, including marked fractures and a detailed report.

## Contributing 🀝

Want to help? Here’s how you can contribute:

1. Fork the project.
2. Create a new branch: `git checkout -b feature/YourFeature`.
3. Make your changes and commit: `git commit -m 'Add some feature'`.
4. Push your branch: `git push origin feature/YourFeature`.
5. Open a pull request.

**Guidelines**:
- Follow the existing code style.
- Write clear commit messages.
- Test your changes before submitting a pull request.

Thank you for contributing!

## πŸ“œ License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

## πŸ“§ Contact
For questions or support, please reach out via the contact methods on my GitHub profile.