File size: 1,947 Bytes
81fd867
 
4f9954d
81fd867
4f9954d
 
 
81fd867
 
4f9954d
81fd867
 
4f9954d
81fd867
 
 
4f9954d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81fd867
4f9954d
174c249
 
 
 
4f9954d
 
 
 
 
174c249
81fd867
4f9954d
81fd867
4f9954d
81fd867
4f9954d
 
 
 
 
81fd867
4f9954d
81fd867
4f9954d
 
 
81fd867
4f9954d
 
81fd867
4f9954d
 
 
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
---
license: apache-2.0
library_name: pytorch
tags:
  - seizure-detection
  - medical-imaging
  - cnn
  - healthcare
  - eeg
pipeline_tag: image-classification
---

# SeizureDetectionCNN

## Model Description

SeizureDetectionCNN is a convolutional neural network designed for binary classification of seizure events using EEG data converted to images. The model employs a simple yet effective architecture with two convolutional layers followed by batch normalization and three fully connected layers.

### Model Architecture

```python
SeizureDetectionCNN(
  (conv1): Conv2d(1, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (pool): MaxPool2d(kernel_size=2, stride=2, padding=0)
  (conv2): Conv2d(32, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (bn1): BatchNorm2d(32)
  (bn2): BatchNorm2d(64)
  (dropout): Dropout(p=0.5)
  (fc1): Linear(in_features=4096, out_features=120)
  (fc2): Linear(in_features=120, out_features=32)
  (fc3): Linear(in_features=32, out_features=2)
)
```

### Input Description

Input images are preprocessed to 32x32 grayscale
Images are normalized with mean=[0.5] and std=[0.5]
Input tensor shape: (batch_size, 1, 32, 32)

### Preprocessing
```python
from torchvision import transforms

transforms.Compose([
    transforms.Grayscale(),
    transforms.Resize((32, 32)),
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.5], std=[0.5])
])
```

## Training Procedure

### Architectural Features

2 Convolutional layers with ReLU activation
Batch Normalization after each convolutional layer
MaxPooling with kernel size 2
Dropout (p=0.5) for regularization
3 Fully connected layers

### Parameters

Total Parameters: ~500K
Input Channels: 1 (grayscale)
Output Classes: 2 (binary classification)

## Intended Uses & Limitations
### Intended Uses

Research and development in seizure detection
Processing of EEG data converted to image format
Binary classification of seizure/non-seizure events