File size: 8,250 Bytes
f749444 13e7d5c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
---
license: cc-by-nc-sa-4.0
language:
- tr
- en
tags:
- mri
- fmri
- MRI
- fMRI
- brain
- dementia
- alzheimer
- neuroscience
- neuro
- neura
- healthcare
---
# Vbai Modelleri
## Model Detayları
#### Vbai Modelleri MRI ve fMRI görüntüleri üzerine eğitilmiştir. Bu modellerin eğitildiği veri setleri Neurazum tarafından gizli tutulmaktadır. Derin öğrenme yöntemleri ile eğitilerek çok yüksek doğruluk oranları ile MRI ve fMRI üzerinde çok hassas bir şekilde çalışabilir. Demans ile ilgili tüm beyin görselleriyle çalışıp, teşhis koyabilir. Nörobilim alanındaki geri kalmışlığa, ilkelliğe ve hata paylarına "bai" modelleriyle birlikte son vermeyi hedeflemektedir.
### Model Tanımı
- **Geliştirici:** _Neurazum_
- **Yayımcı:** _Eyüp İpler_
- **Model Tipi:** _MRI ve fMRI_
- **Lisans:** _CC-BY-NC-SA-4.0_
## Kullanımlar
**Bu modellerdeki amacımız;**
- _Hastanın demans hastalıklarını (alzheimer gibi) daha erken ve daha doğru bir şekilde teşhis koymak,_
- _Hastanelerde çalışan doktorlara teşhis ve inceleme için kolaylık sağlamak,_
- _Risk taşıyan hastaları tespit etmek,_
- _Tanı koyulma aşamasında ki hata paylarını düşürmektir._
## Direkt Kullanımlar
**Klasik Kullanım:**
```python
import torch
import torch.nn as nn
from torchvision import transforms, models
from PIL import Image
import matplotlib.pyplot as plt
import os
from torchsummary import summary
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = models.resnet18(pretrained=False)
num_ftrs = model.fc.in_features
model.fc = nn.Linear(num_ftrs, 4)
model.load_state_dict(torch.load('Vbai-1.0 Dementia/model/yolu'))
model = model.to(device)
model.eval()
summary(model, (3, 224, 224))
transform = transforms.Compose([
transforms.Resize((224, 224)),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
])
class_names = ['Demans Değil', 'Hafif Demans', 'Orta Demans', 'Çok Hafif Demans']
def predict(image_path, model, transform):
image = Image.open(image_path).convert('RGB')
image = transform(image).unsqueeze(0).to(device)
model.eval()
with torch.no_grad():
outputs = model(image)
probs = torch.nn.functional.softmax(outputs, dim=1)
_, preds = torch.max(outputs, 1)
return preds.item(), probs[0][preds.item()].item()
def show_image_with_prediction(image_path, prediction, confidence, class_names):
image = Image.open(image_path)
plt.imshow(image)
plt.title(f"Tahmin: {class_names[prediction]} (%{confidence * 100:.2f})")
plt.axis('off')
plt.show()
test_image_path = 'MRI/veya/fMRI/görüntüsü'
prediction, confidence = predict(test_image_path, model, transform)
print(f'Tahmin: {class_names[prediction]} (%{confidence * 100})')
show_image_with_prediction(test_image_path, prediction, confidence, class_names)
```
## Önyargı, Riskler ve Kısıtlamalar
**Vbai Modelleri;**
- _En büyük riski yanlış teşhis koymasıdır :),_
- _Herhangi bir kısıtlama bulunmamaktadır,_
- _Hastanın beyin görselleri hiçbir şekilde kişisel bilgi içermez. Bu nedenle, Vbai tarafından hiçbir şekilde kişisel veri elde edilemez._
### Öneriler
- _Görseller ne kadar yüksek çözünürlükte olursa o kadar iyidir._
## Modele Nasıl Başlanır
- Modelin içeriğindeki gerekli modülleri kurmak için;
- ```bash
pip install -r requirements.txt
```
- Örnek kullanımla modelin ve veri setinin yolunu yerleştirin,
- Ve dosyayı çalıştırın.
## Değerlendirme
- Vbai-1.0 Dementia => (Doğruluk oranı en az her ihtimalde = %90) (DEMANS DURUMLARI)
### Sonuçlar
[![image](https://r.resimlink.com/BIgjLTN.png)](https://resimlink.com/BIgjLTN)
[![image](https://r.resimlink.com/3lQLUpatA.png)](https://resimlink.com/3lQLUpatA)
[![image](https://r.resimlink.com/uyT5Y.png)](https://resimlink.com/uyT5Y)
#### Özet
Özetle Vbai modelleri, hastanın demans durumunu tespit ederek tıp alanında çalışanlara kolaylık sağlamak amacıyla teşhis koyabilen görüntü işleme modelidir.
## Daha Fazla
LinkedIn: https://www.linkedin.com/company/neurazum
### Yazar
Eyüp İpler - https://www.linkedin.com/in/eyupipler/
### İletişim
neurazum@gmail.com
# ------------------------------------
# Vbai Models
## Model Details
#### Vbai models were trained on MRI and fMRI images. The data sets on which these models are trained are kept confidential by Neurazum. It can work very precisely on MRI and fMRI with very high accuracy rates by training with deep learning methods. It can work with all brain images related to dementia and diagnose. It aims to put an end to the backwardness, primitiveness and error margins in the field of neuroscience with ‘bai’ models.
### Model Description
- **Developed by: _Neurazum_**
- **Shared by: _Eyüp İpler_**
- **Model type: _MRI and fMRI_**
- **License: _CC-BY-NC-SA-4.0_**
## Uses
**Our aim in these models is to;**
- _To diagnose the patient's dementia diseases (such as Alzheimer's) earlier and more accurately,_
- _Providing convenience to doctors working in hospitals for diagnosis and examination,_
- _Identifying patients at risk,_
- _to reduce the margin of error in the diagnostic process._
## Direct Uses
**Classical Use:**
```python
import torch
import torch.nn as nn
from torchvision import transforms, models
from PIL import Image
import matplotlib.pyplot as plt
import os
from torchsummary import summary
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = models.resnet18(pretrained=False)
num_ftrs = model.fc.in_features
model.fc = nn.Linear(num_ftrs, 4)
model.load_state_dict(torch.load('Vbai-1.0 Dementia/model/path'))
model = model.to(device)
model.eval()
summary(model, (3, 224, 224))
transform = transforms.Compose([
transforms.Resize((224, 224)),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
])
class_names = ['Non Demented', 'Mild Demented', 'Moderate Demented', 'Very Mild Demented']
def predict(image_path, model, transform):
image = Image.open(image_path).convert('RGB')
image = transform(image).unsqueeze(0).to(device)
model.eval()
with torch.no_grad():
outputs = model(image)
probs = torch.nn.functional.softmax(outputs, dim=1)
_, preds = torch.max(outputs, 1)
return preds.item(), probs[0][preds.item()].item()
def show_image_with_prediction(image_path, prediction, confidence, class_names):
image = Image.open(image_path)
plt.imshow(image)
plt.title(f"Prediction: {class_names[prediction]} (%{confidence * 100:.2f})")
plt.axis('off')
plt.show()
test_image_path = 'MRI/or/fMRI/image/path'
prediction, confidence = predict(test_image_path, model, transform)
print(f'Prediction: {class_names[prediction]} (%{confidence * 100})')
show_image_with_prediction(test_image_path, prediction, confidence, class_names)
```
## Bias, Risks and Limitations
**Vbai Models;**
- _The biggest risk is misdiagnosis :),_
- _There are no restrictions,_
- _The patient's brain images do not contain any personal information. Therefore, no personal data can be obtained by Vbai in any way._
### Recommendations
- _The higher the resolution of the visuals, the better._
## How to Get Started with the Model
- To install the necessary modeules in the model;
- ```bash
pip install -r requirements.txt
```
- Place the path of the model in the example uses.
- And run the file.
## Evaluation
- Vbai-1.0 Dementia => (Accuracy rate at least in all probability = 90%) (DEMENTIA STATES)
### Results
[![image](https://r.resimlink.com/q93iSBueP0H.png)](https://resimlink.com/q93iSBueP0H)
[![image](https://r.resimlink.com/u5QMO0X42.png)](https://resimlink.com/u5QMO0X42)
[![image](https://r.resimlink.com/2NPDH0l.png)](https://resimlink.com/2NPDH0l)
#### Summary
In summary, Vbai models are image processing models that can diagnose the patient's dementia status in order to provide convenience to medical professionals.
## More
LinkedIn: https://www.linkedin.com/company/neurazum
### Author
Eyüp İpler - https://www.linkedin.com/in/eyupipler/
### Contact
neurazum@gmail.com
|