🚀 醫學文本摘要模型卡片
該模型可用於生成準確且信息豐富的放射學診斷意見,有助於改善放射科醫生與其他醫療服務提供者之間的溝通。
🚀 快速開始
使用以下代碼開始使用該模型:
from transformers import AutoTokenizer, AutoModelForMaskedLM, AutoModelForSeq2SeqLM
from transformers import DataCollatorForSeq2Seq
model_checkpoint = "attach your trained model here"
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
from transformers import SummarizationPipeline
summarizer = SummarizationPipeline(model=model, tokenizer=tokenizer)
output= summarizer("heart size normal mediastinal hilar contours remain stable small right pneumothorax remains unchanged surgical lung staples overlying left upper lobe seen linear pattern consistent prior upper lobe resection soft tissue osseous structures appear unremarkable nasogastric endotracheal tubes remain satisfactory position atelectatic changes right lower lung field remain unchanged prior study")
✨ 主要特性
該模型是基於BioBart的序列到序列模型,經過在自定義數據集上的訓練,能夠將放射學檢查結果總結為診斷意見。
📦 安裝指南
文檔未提及安裝步驟,暫不展示。
💻 使用示例
基礎用法
from transformers import AutoTokenizer, AutoModelForMaskedLM, AutoModelForSeq2SeqLM
from transformers import DataCollatorForSeq2Seq
model_checkpoint = "attach your trained model here"
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
from transformers import SummarizationPipeline
summarizer = SummarizationPipeline(model=model, tokenizer=tokenizer)
output= summarizer("heart size normal mediastinal hilar contours remain stable small right pneumothorax remains unchanged surgical lung staples overlying left upper lobe seen linear pattern consistent prior upper lobe resection soft tissue osseous structures appear unremarkable nasogastric endotracheal tubes remain satisfactory position atelectatic changes right lower lung field remain unchanged prior study")
📚 詳細文檔
模型詳情
模型描述
此模型是基於BioBart的序列到序列模型,在自定義數據集上進行訓練,用於將放射學檢查結果總結為診斷意見。在訓練過程中,使用了70000份放射學報告來訓練模型,使其能夠將檢查結果總結為診斷意見。
- 開發者:[Engr. Hamza Iqbal Malik (UET TAXILA)]
- 分享者:[Engr. Hamza Iqbal Malik (UET TAXILA)]
- 模型類型:[醫學文本摘要模型]
- 語言(NLP):[英語]
- 微調基礎模型:[GanjinZero/biobart-v2-base]
模型來源
- 倉庫:[GanjinZero/biobart-v2-base]
- 論文:[BioBART: Pretraining and Evaluation of A Biomedical Generative Language Model]
模型用途
直接用途
該模型可直接用於根據放射學報告生成診斷意見。用戶輸入放射學報告的檢查結果,模型將基於這些信息生成總結性的診斷意見。
非預期用途
該模型僅適用於根據放射學報告生成診斷意見,不適合用於放射學報告摘要之外的任務。
使用建議
用戶在使用生成的診斷意見進行臨床決策時,應瞭解模型的侷限性和潛在偏差。需要更多信息才能提供具體建議。
訓練詳情
訓練數據
訓練數據是一個包含70000份放射學報告的自定義數據集。數據經過清理,去除了任何個人或機密信息,還進行了分詞和歸一化處理。訓練數據被分為訓練集和驗證集,訓練集包含63000份放射學報告,驗證集包含7000份放射學報告。
訓練過程
該模型使用Hugging Face Transformers庫進行訓練:https://huggingface.co/transformers/ 。使用AdamW優化器,學習率為5.6e - 5,訓練了10個epoch。
訓練超參數
- 訓練方案:
- [evaluation_strategy="epoch"]
- [learning_rate=5.6e - 5]
- [per_device_train_batch_size=batch_size //4]
- [per_device_eval_batch_size=batch_size //4]
- [weight_decay=0.01]
- [save_total_limit=3]
- [num_train_epochs=num_train_epochs //4]
- [predict_with_generate=True //4]
- [logging_steps=logging_steps]
- [push_to_hub=False]
評估
測試數據、因素和指標
測試數據
測試數據包含10000份放射學報告。
評估因素
評估了以下因素:
- [-ROUGE - 1]
- [-ROUGE - 2]
- [-ROUGE - L]
- [-ROUGELSUM]
評估指標
使用以下指標評估模型:
- [-ROUGE - 1得分:44.857]
- [-ROUGE - 2得分:29.015]
- [-ROUGE - L得分:42.032]
- [-ROUGELSUM得分:42.038]
評估結果
該模型在測試數據上的ROUGE - L得分為42.032,這表明模型生成的摘要與人工撰寫的摘要非常相似。
模型卡片作者
- 姓名:Engr. Hamza Iqbal Malik
- 領英:[www.linkedin.com/in/hamza - iqbal - malik - 42366a239](www.linkedin.com/in/hamza - iqbal - malik - 42366a239)
- GitHub:https://github.com/hamza4344
模型卡片聯繫人
- 姓名:Engr. Hamza Iqbal Malik
- 領英:[www.linkedin.com/in/hamza - iqbal - malik - 42366a239](www.linkedin.com/in/hamza - iqbal - malik - 42366a239)
- GitHub:https://github.com/hamza4344
🔧 技術細節
文檔未提供足夠詳細的技術實現細節,暫不展示。
📄 許可證
文檔未提及許可證信息,暫不展示。
📋 模型信息表格
屬性 |
詳情 |
模型類型 |
醫學文本摘要模型 |
訓練數據 |
包含70000份放射學報告的自定義數據集,經過清理、分詞和歸一化處理,分為63000份的訓練集和7000份的驗證集 |
微調基礎模型 |
GanjinZero/biobart - v2 - base |
語言(NLP) |
英語 |
開發者 |
Engr. Hamza Iqbal Malik (UET TAXILA) |
分享者 |
Engr. Hamza Iqbal Malik (UET TAXILA) |
倉庫 |
GanjinZero/biobart - v2 - base |
論文 |
BioBART: Pretraining and Evaluation of A Biomedical Generative Language Model |