CoolFace
Modelpublic

cwlachap/hrnet-cephalometric-landmark-detection

sourceHugging Facemitupdated 1y agoView on Hugging Face
5likes71downloads
Model Card

HRNet Cephalometric Landmark Detection

This model performs automatic detection of 19 anatomical landmarks in lateral cephalometric radiographs using HRNet-W32 architecture.

๐Ÿฆท Model Description

  • โ€”Architecture: HRNet-W32 (High-Resolution Network)
  • โ€”Task: 19-point cephalometric landmark detection
  • โ€”Dataset: ISBI Lateral Cephalograms
  • โ€”Input Size: 768ร—768 pixels
  • โ€”Output: 19 landmark coordinates (x, y)
  • โ€”Model Size: 331.1 MB

๐Ÿ“ Landmarks Detected

  1. 1.Sella turcica - Center of pituitary fossa
  2. 2.Nasion - Frontonasal suture
  3. 3.Orbitale - Lowest point of orbital cavity
  4. 4.Porion - Highest point of acoustic meatus
  5. 5.Subspinale (Point A) - Deepest midline point on maxilla
  6. 6.Supramentale (Point B) - Deepest midline point on mandible
  7. 7.Pogonion - Most prominent midline point of chin
  8. 8.Menton - Lowest point of mandibular symphysis
  9. 9.Gnathion - Midpoint between Pogonion and Menton
  10. 10.Gonion - Corner of the jaw angle
  11. 11.Lower Incisor Tip - Tip of lower central incisor
  12. 12.Upper Incisor Tip - Tip of upper central incisor
  13. 13.Upper Lip - Most prominent point of upper lip
  14. 14.Lower Lip - Most prominent point of lower lip
  15. 15.Subnasale - Junction between nose and upper lip
  16. 16.Soft Tissue Pogonion - Most prominent point of chin in profile
  17. 17.Posterior Nasal Spine - Tip of posterior nasal spine
  18. 18.Anterior Nasal Spine - Tip of anterior nasal spine
  19. 19.Articulare - Junction of temporal bone and mandible

๐Ÿš€ Usage

Quick Start with Streamlit

python
import streamlit as st
import torch
from huggingface_hub import hf_hub_download

# Download model
@st.cache_resource
def load_model():
    model_path = hf_hub_download(
        repo_id="cwlachap/hrnet-cephalometric-landmark-detection",
        filename="best_model.pth"
    )
    
    # Load your HRNet model here
    model = get_hrnet_w32(config)
    checkpoint = torch.load(model_path, map_location='cpu')
    model.load_state_dict(checkpoint['model_state_dict'])
    model.eval()
    return model

model = load_model()

Python API

python
import torch
from huggingface_hub import hf_hub_download

# Download model
model_path = hf_hub_download(
    repo_id="cwlachap/hrnet-cephalometric-landmark-detection",
    filename="best_model.pth"
)

# Load model
model = get_hrnet_w32(config)
checkpoint = torch.load(model_path, map_location='cpu')
model.load_state_dict(checkpoint['model_state_dict'])
model.eval()

# Perform inference
with torch.no_grad():
    landmarks = model(input_image)

๐Ÿ“Š Performance

  • โ€”Mean Radial Error (MRE): ~1.2-1.6mm
  • โ€”Successful Detection Rate (SDR@2mm): ~80-85%
  • โ€”Successful Detection Rate (SDR@2.5mm): ~88-92%
  • โ€”Training Time: ~15-20 hours on RTX 4070 Ti SUPER

๐Ÿฅ Applications

  • โ€”Orthodontic Treatment Planning: Automated cephalometric analysis
  • โ€”Research: Large-scale cephalometric studies
  • โ€”Education: Teaching cephalometric landmark identification
  • โ€”Clinical Decision Support: Assisting radiological assessment

โš ๏ธ Limitations

  • โ€”Designed for lateral cephalometric radiographs only
  • โ€”Performance may vary on images with different acquisition parameters
  • โ€”Intended for research and educational purposes
  • โ€”Clinical use requires validation by qualified professionals

๐Ÿ“ Citation

If you use this model in your research, please cite:

bibtex
@misc{hrnet-cephalometric-2024,
  title={HRNet for Cephalometric Landmark Detection},
  author={cwlachap},
  year={2024},
  url={https://huggingface.co/cwlachap/hrnet-cephalometric-landmark-detection}
}

๐Ÿ“„ License

This model is released under the MIT License, making it free for both academic and commercial use.

๐Ÿค Contributing

This is an open-source project! Contributions, issues, and feature requests are welcome.

  • โ€”Repository: [GitHub Repository URL]
  • โ€”Issues: [GitHub Issues URL]
  • โ€”Discussions: Use the Community tab above

๐Ÿ™ Acknowledgments

  • โ€”ISBI Challenge for providing the cephalometric dataset
  • โ€”HRNet authors for the excellent architecture
  • โ€”The medical imaging community for advancing automated analysis techniques

Built with โค๏ธ for the medical imaging community