An advanced AI-powered system for extracting structured data from medical superbills with enhanced patient differentiation, CPT/ICD-10 code marking, and GPU-optimized sequential processing.
PDF Input → Document Processing → Nanonets OCR → Text Segmentation →
NuExtract Processing → Patient Differentiation → Code Marking →
Structured Output
pip install -r requirements.txt
Key dependencies:
torch>=2.0.0 - PyTorch with CUDA supporttransformers>=4.38.0 - Hugging Face modelsstreamlit>=1.28.0 - Web interfacepandas>=1.5.0 - Data processingpillow>=10.0.0 - Image processingPyMuPDF>=1.20.0 - PDF handling# Run with UI
python main_app.py --ui
# Process single file
python main_app.py --input path/to/superbill.pdf
# Process directory
python main_app.py --input superbills/ --batch
# Disable GPU (CPU only)
python main_app.py --input superbill.pdf --no-gpu
streamlit run ui/app.py
python enhanced_superbill_processor.py
# Basic processing with GPU optimization
python main_app.py --input medical_documents/
# Advanced processing with custom config
python main_app.py --input documents/ --config custom_config.yaml --batch
# Launch interactive UI
python main_app.py --ui
import asyncio
from src.extraction_engine import ExtractionEngine
from src.core.config_manager import ConfigManager
# Initialize with sequential loading
config = ConfigManager()
config.update_config("models.sequential_loading", True)
config.update_config("processing.use_cuda", True)
engine = ExtractionEngine(config)
# Process document
async def extract_data():
results = await engine.extract_from_file("superbill.pdf")
return results
# Run extraction
results = asyncio.run(extract_data())
The system uses multiple advanced techniques:
Enhanced CPT and ICD-10 code detection:
CUDA acceleration features:
models:
sequential_loading: true
unload_after_use: true
processing:
use_cuda: true
mixed_precision: true
batch_size: 1
ocr:
model_name: "nanonets/Nanonets-OCR-s"
enable_ensemble: false
extraction:
nuextract:
model_name: "numind/NuExtract-2.0-8B"
enable_patient_differentiation: true
enhanced_cpt_icd_marking: true
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for medical data processing
13 commits
Python
98.9%
CSS
1.1%
An advanced AI-powered system for extracting structured data from medical superbills with enhanced patient differentiation, CPT/ICD-10 code marking, and GPU-optimized sequential processing.
PDF Input → Document Processing → Nanonets OCR → Text Segmentation →
NuExtract Processing → Patient Differentiation → Code Marking →
Structured Output
pip install -r requirements.txt
Key dependencies:
torch>=2.0.0 - PyTorch with CUDA supporttransformers>=4.38.0 - Hugging Face modelsstreamlit>=1.28.0 - Web interfacepandas>=1.5.0 - Data processingpillow>=10.0.0 - Image processingPyMuPDF>=1.20.0 - PDF handling# Run with UI
python main_app.py --ui
# Process single file
python main_app.py --input path/to/superbill.pdf
# Process directory
python main_app.py --input superbills/ --batch
# Disable GPU (CPU only)
python main_app.py --input superbill.pdf --no-gpu
streamlit run ui/app.py
python enhanced_superbill_processor.py
# Basic processing with GPU optimization
python main_app.py --input medical_documents/
# Advanced processing with custom config
python main_app.py --input documents/ --config custom_config.yaml --batch
# Launch interactive UI
python main_app.py --ui
import asyncio
from src.extraction_engine import ExtractionEngine
from src.core.config_manager import ConfigManager
# Initialize with sequential loading
config = ConfigManager()
config.update_config("models.sequential_loading", True)
config.update_config("processing.use_cuda", True)
engine = ExtractionEngine(config)
# Process document
async def extract_data():
results = await engine.extract_from_file("superbill.pdf")
return results
# Run extraction
results = asyncio.run(extract_data())
The system uses multiple advanced techniques:
Enhanced CPT and ICD-10 code detection:
CUDA acceleration features:
models:
sequential_loading: true
unload_after_use: true
processing:
use_cuda: true
mixed_precision: true
batch_size: 1
ocr:
model_name: "nanonets/Nanonets-OCR-s"
enable_ensemble: false
extraction:
nuextract:
model_name: "numind/NuExtract-2.0-8B"
enable_patient_differentiation: true
enhanced_cpt_icd_marking: true
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for medical data processing
13 commits
Python
98.9%
CSS
1.1%