File size: 1,939 Bytes
ff90834
 
 
 
 
 
7ee183c
 
 
085f5d9
7ee183c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ff90834
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
---
license: mit
datasets: AllenTAN/image_sentiment
base_model: google/efficientnet-b2
---

# EfficientNet B2 Image Classification

This project implements an image classification model using the EfficientNet B2 architecture, fine-tuned on a custom dataset. It provides a modular and easy-to-use structure for training and evaluating the model.
Dataset used: AllenTAN/image_sentiment

## Project Structure

```
project_root/
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ train/
β”‚   └── test/
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ data_setup.py
β”‚   β”œβ”€β”€ train_and_test.py
β”‚   β”œβ”€β”€ model.py
β”‚
β”œβ”€β”€ main.py
β”œβ”€β”€ requirements.txt
└── README.md
```

- `data/`: Contains the training and testing datasets.
- `src/`: Source code for the project.
- `main.py`: The entry point of the project.

## Setup

1. Clone the repository:

   ```
   git clone https://github.com/brepositorium/effnetb2-sentiment-analysis.git
   cd effnetb2-sentiment-analysis
   ```

2. Create a virtual environment and activate it:

   ```
   python -m venv venv
   source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
   ```

3. Install the required packages:
   ```
   pip install -r requirements.txt
   ```

## Usage

To train the model, run:

```
python main.py
```

This will start the training process using the EfficientNet B2 model on your dataset. The script will output training progress and final results.

## Customization

- Edit `src/model.py` to experiment with different model architectures or layer configurations.
- Adjust data augmentation in `src/data_setup.py` if needed.

## Results

After training, the model will output training and validation accuracy and loss. You can find these results printed in the console output.

## Contributing

Feel free to open issues or submit pull requests if you have suggestions for improvements or encounter any problems.

## License

MIT License