diff --git a/Main Models/README.md b/Main Models/README.md deleted file mode 100644 index 3357163..0000000 --- a/Main Models/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Python Sürümü / Python Version - -### 3.9 <=> 3.13 - -# Modüller / Modules - -```bash -pip install -r requirements.txt -``` - -## Model kullanımları ve işlevleri alt klasörlerde belirtilmiştir. -## Model uses and functions are specified in subfolders. diff --git a/Main Models/bai-2.0/README.md b/Main Models/bai-2.0/README.md deleted file mode 100644 index a8b4c5c..0000000 --- a/Main Models/bai-2.0/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# bai-2.0 (338787 parametre) - -## EEG üzerinden duygu sınıflandırması yapan ilk kararlı modellerimizden olan "bai-2.0" modeli. - -#### NOT: Gerçek zamanlı EEG veri takibi uygulamasına modeli entegre ederseniz, gerçek zamanlı olarak duygu tahmini yapabilmektedir. Uygulamaya erişebilmek için: https://github.com/neurazum/Realtime-EEG-Monitoring - -## ----------------------------------------------------------------------------------- - -# bai-2.0 (338787 parameters) - -## "bai-2.0" model, one of the first stable models that classifies emotions via EEG. - -#### NOTE: If you integrate the model into a real-time EEG data tracking application, it can predict emotions in real time. To access the application: https://github.com/neurazum/Realtime-EEG-Monitoring - -**Doğruluk/Accuracy: %97.93621013133207** - -## ----------------------------------------------------------------------------------- - -# Kullanım / Usage - -```python -import numpy as np -import pandas as pd -from sklearn.preprocessing import StandardScaler -from tensorflow.keras.models import load_model -import matplotlib.pyplot as plt - -model_path = 'model-path' - -model = load_model(model_path) - -model_name = model_path.split('/')[-1].split('.')[0] - -plt.figure(figsize=(10, 6)) -plt.title(f'Duygu Tahmini ({model_name}.0)') -plt.xlabel('Zaman') -plt.ylabel('Sınıf') -plt.legend(loc='upper right') -plt.grid(True) -plt.show() -model.summary() -``` - -# Tahmin / Prediction - -```python -import numpy as np -import pandas as pd -from sklearn.preprocessing import StandardScaler -from tensorflow.keras.models import load_model - -model_path = 'model-path' - -model = load_model(model_path) - -scaler = StandardScaler() - -predictions = model.predict(X_new_reshaped) -predicted_labels = np.argmax(predictions, axis=1) - -label_mapping = {'NEGATIVE': 0, 'NEUTRAL': 1, 'POSITIVE': 2} -label_mapping_reverse = {v: k for k, v in label_mapping.items()} - -#new_input = np.array([[23, 465, 12, 9653] * 637]) -new_input = np.random.rand(1, 2548) # 1 örnek ve 2548 özellik -new_input_scaled = scaler.fit_transform(new_input) -new_input_reshaped = new_input_scaled.reshape((new_input_scaled.shape[0], 1, new_input_scaled.shape[1])) - -new_prediction = model.predict(new_input_reshaped) -predicted_label = np.argmax(new_prediction, axis=1)[0] -predicted_emotion = label_mapping_reverse[predicted_label] - -if predicted_emotion == 'NEGATIVE': - predicted_emotion = 'Negatif' -elif predicted_emotion == 'NEUTRAL': - predicted_emotion = 'Nötr' -elif predicted_emotion == 'POSITIVE': - predicted_emotion = 'Pozitif' - -print(f'Giriş Verileri: {new_input}') -print(f'Tahmin Edilen Duygu: {predicted_emotion}') -``` diff --git a/Main Models/bai-2.0/bai-2.0.keras b/Main Models/bai-2.0/bai-2.0.keras deleted file mode 100644 index 47bc7f2..0000000 Binary files a/Main Models/bai-2.0/bai-2.0.keras and /dev/null differ diff --git a/Main Models/bai-2.1/README.md b/Main Models/bai-2.1/README.md deleted file mode 100644 index dfec4ba..0000000 --- a/Main Models/bai-2.1/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# bai-2.1 (338787 parametre) - -## EEG üzerinden duygu sınıflandırması yapan "bai-2.1" modeli, bir önceki model olan "bai-2.0" modeline göre overfitting ihtimali azaltılmış ve optimize edilmiş versiyonudur. Tüm işlevleri aynıdır. - -#### NOT: Gerçek zamanlı EEG veri takibi uygulamasına modeli entegre ederseniz, gerçek zamanlı olarak duygu tahmini yapabilmektedir. Uygulamaya erişebilmek için: https://github.com/neurazum/Realtime-EEG-Monitoring - -## ----------------------------------------------------------------------------------- - -# bai-2.1 (338787 parameters) - -## The "bai-2.1" model, which performs emotion classification over EEG, is an optimised version of the previous model "bai-2.0" with reduced overfitting probability. All functions are the same. - -#### NOTE: If you integrate the model into a real-time EEG data tracking application, it can predict emotions in real time. To access the application: https://github.com/neurazum/Realtime-EEG-Monitoring - -**Doğruluk/Accuracy: %97.93621013133207** - -## ----------------------------------------------------------------------------------- - -# Kullanım / Usage - -```python -import numpy as np -import pandas as pd -from sklearn.preprocessing import StandardScaler -from tensorflow.keras.models import load_model -import matplotlib.pyplot as plt - -model_path = 'model-path' - -model = load_model(model_path) - -model_name = model_path.split('/')[-1].split('.')[0] - -plt.figure(figsize=(10, 6)) -plt.title(f'Duygu Tahmini ({model_name}.1)') -plt.xlabel('Zaman') -plt.ylabel('Sınıf') -plt.legend(loc='upper right') -plt.grid(True) -plt.show() -model.summary() -``` - -# Tahmin / Prediction - -```python -import numpy as np -import pandas as pd -from sklearn.preprocessing import StandardScaler -from tensorflow.keras.models import load_model - -model_path = 'model-path' - -model = load_model(model_path) - -scaler = StandardScaler() - -predictions = model.predict(X_new_reshaped) -predicted_labels = np.argmax(predictions, axis=1) - -label_mapping = {'NEGATIVE': 0, 'NEUTRAL': 1, 'POSITIVE': 2} -label_mapping_reverse = {v: k for k, v in label_mapping.items()} - -#new_input = np.array([[23, 465, 12, 9653] * 637]) -new_input = np.random.rand(1, 2548) # 1 örnek ve 2548 özellik -new_input_scaled = scaler.fit_transform(new_input) -new_input_reshaped = new_input_scaled.reshape((new_input_scaled.shape[0], 1, new_input_scaled.shape[1])) - -new_prediction = model.predict(new_input_reshaped) -predicted_label = np.argmax(new_prediction, axis=1)[0] -predicted_emotion = label_mapping_reverse[predicted_label] - -if predicted_emotion == 'NEGATIVE': - predicted_emotion = 'Negatif' -elif predicted_emotion == 'NEUTRAL': - predicted_emotion = 'Nötr' -elif predicted_emotion == 'POSITIVE': - predicted_emotion = 'Pozitif' - -print(f'Giriş Verileri: {new_input}') -print(f'Tahmin Edilen Duygu: {predicted_emotion}') -``` diff --git a/Main Models/bai-2.1/bai-2.1.keras b/Main Models/bai-2.1/bai-2.1.keras deleted file mode 100644 index 0075a5c..0000000 Binary files a/Main Models/bai-2.1/bai-2.1.keras and /dev/null differ diff --git a/Main Models/bai-2.2/README.md b/Main Models/bai-2.2/README.md deleted file mode 100644 index 5791535..0000000 --- a/Main Models/bai-2.2/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# bai-2.2 (164790 parametre) - -## bai-2.0 ve 2.1 sürümlerinin daha hızlı ve optimize edilmiş versiyonudur. Tüm işlevleri aynıdır. - -#### NOT: Gerçek zamanlı EEG veri takibi uygulamasına modeli entegre ederseniz, gerçek zamanlı olarak duygu tahmini yapabilmektedir. Uygulamaya erişebilmek için: https://github.com/neurazum/Realtime-EEG-Monitoring - -## ----------------------------------------------------------------------------------- - -# bai-2.2 (164790 parameters) - -## It is a faster and optimized version of bai-2.0 and 2.1. All functions are the same. - -#### NOTE: If you integrate the model into a real-time EEG data tracking application, it can predict emotions in real time. To access the application: https://github.com/neurazum/Realtime-EEG-Monitoring - - -**Doğruluk/Accuracy: %94,8874296435272** - -## ----------------------------------------------------------------------------------- - -# Kullanım / Usage - -```python -import numpy as np -import pandas as pd -from sklearn.preprocessing import StandardScaler -from tensorflow.keras.models import load_model -import matplotlib.pyplot as plt - -model_path = 'model-path' - -model = load_model(model_path) - -model_name = model_path.split('/')[-1].split('.')[0] - -plt.figure(figsize=(10, 6)) -plt.title(f'Duygu Tahmini ({model_name}.2)') -plt.xlabel('Zaman') -plt.ylabel('Sınıf') -plt.legend(loc='upper right') -plt.grid(True) -plt.show() -model.summary() -``` - -# Tahmin / Prediction - -```python -import numpy as np -import pandas as pd -from sklearn.preprocessing import StandardScaler -from tensorflow.keras.models import load_model - -model_path = 'model-path' - -model = load_model(model_path) - -scaler = StandardScaler() - -predictions = model.predict(X_new_reshaped) -predicted_labels = np.argmax(predictions, axis=1) - -label_mapping = {'NEGATIVE': 0, 'NEUTRAL': 1, 'POSITIVE': 2} -label_mapping_reverse = {v: k for k, v in label_mapping.items()} - -#new_input = np.array([[23, 465, 12, 9653] * 637]) -new_input = np.random.rand(1, 2548) # 1 örnek ve 2548 özellik -new_input_scaled = scaler.fit_transform(new_input) -new_input_reshaped = new_input_scaled.reshape((new_input_scaled.shape[0], 1, new_input_scaled.shape[1])) - -new_prediction = model.predict(new_input_reshaped) -predicted_label = np.argmax(new_prediction, axis=1)[0] -predicted_emotion = label_mapping_reverse[predicted_label] - -if predicted_emotion == 'NEGATIVE': - predicted_emotion = 'Negatif' -elif predicted_emotion == 'NEUTRAL': - predicted_emotion = 'Nötr' -elif predicted_emotion == 'POSITIVE': - predicted_emotion = 'Pozitif' - -print(f'Giriş Verileri: {new_input}') -print(f'Tahmin Edilen Duygu: {predicted_emotion}') -``` diff --git a/Main Models/bai-2.2/bai-2.2.keras b/Main Models/bai-2.2/bai-2.2.keras deleted file mode 100644 index e12cf76..0000000 Binary files a/Main Models/bai-2.2/bai-2.2.keras and /dev/null differ diff --git a/Main Models/bai-3.0 Emotion/README.md b/Main Models/bai-3.0 Emotion/README.md deleted file mode 100644 index ed97709..0000000 --- a/Main Models/bai-3.0 Emotion/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# bai-3.0 Emotion (3549313 parametre) - -## "bai-3.0 Emotion" modeli, EEG üzerine eğitilmiş dünyanın en büyük üçüncü yapay zeka modelidir. Kişinin duygu durum analizini yapmaktadır. - -#### NOT: Gerçek zamanlı EEG veri takibi uygulamasına modeli entegre ederseniz, gerçek zamanlı olarak duygu tahmini yapabilmektedir. Uygulamaya erişebilmek için: https://github.com/neurazum/Realtime-EEG-Monitoring - -## ----------------------------------------------------------------------------------- - -# bai-3.0 Emotion (3549313 parameters) - -## The "bai-3.0 Emotion" model is the world's third largest artificial intelligence model trained on EEG. It analyzes the person's emotional state. - -## NOTE: If you integrate the model into a real-time EEG data tracking application, it can predict emotions in real time. To access the application: https://github.com/neurazum/Realtime-EEG-Monitoring -**Doğruluk/Accuracy: %97,79549718574108** - -[![bai-3.0](https://img.youtube.com/vi/qUkId3S9W94/0.jpg)](https://www.youtube.com/watch?v=qUkId3S9W94) - -# Kullanım / Usage - -```python -import numpy as np -import pandas as pd -from sklearn.preprocessing import StandardScaler -from tensorflow.keras.models import load_model -import matplotlib.pyplot as plt - -model_path = 'model-path' - -model = load_model(model_path) - -model_name = model_path.split('/')[-1].split('.')[0] - -plt.figure(figsize=(10, 6)) -plt.title(f'Duygu Tahmini ({model_name}.2)') -plt.xlabel('Zaman') -plt.ylabel('Sınıf') -plt.legend(loc='upper right') -plt.grid(True) -plt.show() -model.summary() -``` - -# Tahmin / Prediction - -```python -import numpy as np -import pandas as pd -from sklearn.preprocessing import StandardScaler -from tensorflow.keras.models import load_model - -model_path = 'model-path' - -model = load_model(model_path) - -scaler = StandardScaler() - -predictions = model.predict(X_new_reshaped) -predicted_labels = np.argmax(predictions, axis=1) - -label_mapping = {'NEGATIVE': 0, 'NEUTRAL': 1, 'POSITIVE': 2} -label_mapping_reverse = {v: k for k, v in label_mapping.items()} - -#new_input = np.array([[23, 465, 12, 9653] * 637]) -new_input = np.random.rand(1, 2548) # 1 örnek ve 2548 özellik -new_input_scaled = scaler.fit_transform(new_input) -new_input_reshaped = new_input_scaled.reshape((new_input_scaled.shape[0], 1, new_input_scaled.shape[1])) - -new_prediction = model.predict(new_input_reshaped) -predicted_label = np.argmax(new_prediction, axis=1)[0] -predicted_emotion = label_mapping_reverse[predicted_label] - -if predicted_emotion == 'NEGATIVE': - predicted_emotion = 'Negatif' -elif predicted_emotion == 'NEUTRAL': - predicted_emotion = 'Nötr' -elif predicted_emotion == 'POSITIVE': - predicted_emotion = 'Pozitif' - -print(f'Giriş Verileri: {new_input}') -print(f'Tahmin Edilen Duygu: {predicted_emotion}') -``` - -# Python Sürümü / Python Version - -### 3.9 <=> 3.13 - -# Modüller / Modules - -```bash -matplotlib==3.8.0 -matplotlib-inline==0.1.6 -numpy==1.26.4 -pandas==2.2.2 -scikit-learn==1.3.1 -tensorflow==2.15.0 -``` diff --git a/Main Models/bai-3.0 Emotion/bai-3.0 Emotion.keras b/Main Models/bai-3.0 Emotion/bai-3.0 Emotion.keras deleted file mode 100644 index 2d1081c..0000000 Binary files a/Main Models/bai-3.0 Emotion/bai-3.0 Emotion.keras and /dev/null differ diff --git a/Main Models/bai-3.0 Epilepsy/README.md b/Main Models/bai-3.0 Epilepsy/README.md deleted file mode 100644 index ae78a6e..0000000 --- a/Main Models/bai-3.0 Epilepsy/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# bai-3.0 Epilepsy (45851parametre) - -## "bai-3.0 Epilepsy" modeli, hastanın epilepsi nöbeti durumunu tespit eder. - -#### NOT: Gerçek zamanlı EEG veri takibi uygulamasına modeli entegre ederseniz, gerçek zamanlı olarak nöbet durumu tahmini yapabilmektedir. Uygulamaya erişebilmek için: https://github.com/neurazum/Realtime-EEG-Monitoring - -## ----------------------------------------------------------------------------------- - -# bai-3.0 Epilepsy (45851 parameters) - -## The "bai-3.0 Epilepsy" model detects the patient's epileptic seizure status. - -#### NOTE: If you integrate the model into a real-time EEG data tracking application, it can predict epilepsy seizure state in real time. To access the application: https://github.com/neurazum/Realtime-EEG-Monitoring -**Doğruluk/Accuracy: %68,90829694323143** - -[![bai-3.0](https://img.youtube.com/vi/qUkId3S9W94/0.jpg)](https://www.youtube.com/watch?v=qUkId3S9W94) - -# Kullanım / Usage - -```python -import pandas as pd -import numpy as np -import ast -from tensorflow.keras.models import load_model, Sequential -from sklearn.metrics import accuracy_score - -model_path = 'model/path' - -model = load_model(model_path) - -test_data_path = 'epilepsy/dataset' -test_data = pd.read_csv(test_data_path) - -test_data['sample'] = test_data['sample'].apply(ast.literal_eval) - -X_test = np.array(test_data['sample'].tolist()) -y_test = test_data['label'].values.astype(int) - -timesteps = 10 - -X_test_reshaped = [] - -for i in range(len(X_test) - timesteps): - X_test_reshaped.append(X_test[i:i + timesteps]) - -X_test_reshaped = np.array(X_test_reshaped) - -y_pred = model.predict(X_test_reshaped) -y_pred_classes = (y_pred > 0.77).astype(int) # En kararlı sonuçlar -> 0.78 ve 0.77. Eşik değeri: çıkan sonucun yuvarlama değerini artırıp azaltma. -# Örn. Olasılık < 0.77 ise "0", olasılık >= 0.77 ise "1" tahminini yap. - -accuracy = accuracy_score(y_test[timesteps:], y_pred_classes) - -print("Gerçek Değerler (1: Nöbet, 0: Nöbet Değil) ve Tahminler:") -for i in range(len(y_pred_classes)): - print(f"Gerçek: {y_test[i + timesteps]}, Tahmin: {y_pred_classes[i][0]}") -print(f"Modelin doğruluk oranı: %{accuracy * 100}") -model.summary() -``` - -# Python Sürümü / Python Version - -### 3.9 <=> 3.13 - -# Modüller / Modules - -```bash -matplotlib==3.8.0 -matplotlib-inline==0.1.6 -numpy==1.26.4 -pandas==2.2.2 -scikit-learn==1.3.1 -tensorflow==2.15.0 -``` diff --git a/Main Models/bai-3.0 Epilepsy/bai-3.0 Epilepsy.keras b/Main Models/bai-3.0 Epilepsy/bai-3.0 Epilepsy.keras deleted file mode 100644 index 9b2d072..0000000 Binary files a/Main Models/bai-3.0 Epilepsy/bai-3.0 Epilepsy.keras and /dev/null differ diff --git a/Main Models/requirements.txt b/Main Models/requirements.txt deleted file mode 100644 index 9411e7f..0000000 Binary files a/Main Models/requirements.txt and /dev/null differ