application_video.mp4
Mammo Lingua is a GUI application for Name Entity Recognition (NER) and BIRADS Classification. The application is built using Python with PyQt5 for the GUI and SpaCy for NER. The goal is to provide a tool that can analyze medical texts, identify named entities, and classify BIRADS categories.
- Introduction
- Installation
- Usage
- Features
- Dependencies
- Configuration
- Examples
- Troubleshooting
- Contributors
- License
- Python 3.10+
- Clone the repository:
git clone https://github.com/your-repo/mammo-lingua.git cd mammo-lingua bash app.sh
All other installation procedures will be completed automatically with app.sh and Makefile files. The other procedures are listed as follows.
- Virtual Environment Setup: With the app.sh file, an environment named “.venv” is created in the current location where the main file is located and all modules in requirements.txt are transferred to this structure.
- Makefile Setup Operations: With the help of the Makefile file, the following operations are performed respectively:
- Loading LLM models: In order to use the program, the NLP models embedded in Huggingface need to be integrated into the system. At this point, the “install_models” method in the Makefile will download the Name Entity Recognition and Birads Classification methods from Huggingface and complete their installation.
- Creation of a desktop shortcut: The “create_shortcut” method in the Makefile allows users to easily create a shortcut on the desktop.
To start the application, you can use the .desktop shortcut in your desktop.
- Click on Upload File to upload a text file for analysis.
- Once the file is uploaded, click Show Results to view the NER and BIRADS classification results.
- You can also Save Results to export the analysis as a JSON file.
- Custom GUI: A modern, dark-themed user interface built with PyQt5.
- NER Analysis: Automatically extracts medical entities (e.g., anatomy, observations) from the text.
- BIRADS Classification: Classifies the text based on BIRADS categories using a pre-trained model.
- File Upload and Save: Upload medical text files for analysis and save the results in JSON format.
- Dark Mode: Dark theme for enhanced readability.
This project relies on the following Python packages:
PyQt5==5.15.11
spacy==3.7.6
transformers==4.36.2
torch==2.4.1
requests==2.32.3
# More dependencies can be found in requirements.txt
For a full list, refer to the requirements.txt file.
- Model Paths: The application expects the NER and BIRADS models to be located in
data/nlp_models/
. You can update the paths inmain.py
if needed:
birads_model_path = os.path.join(os.path.dirname(
os.path.abspath(__file__)), "data/nlp_models/classification_model")
ner_model_path = ner_model_path = os.path.join(os.path.dirname(
os.path.abspath(__file__)), "data/nlp_models/ner_model")
Here's an example of how to use the tool:
- Start the application.
- Upload a medical text file (e.g., a report).
- View the identified entities and BIRADS classification.
- Save the results as a JSON file for further analysis.
- Models not loading: Ensure the NER and BIRADS models are correctly placed in the
data/nlp_models/
folder. - Dependencies issues: Double-check that all dependencies listed in
requirements.txt
are installed correctly.
Important
This project is licensed under the CC BY-NC-SA 4.0 License. See the LICENSE file for details.