bhimrazy commited on
Commit
3683851
1 Parent(s): ff3ac9e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +53 -5
README.md CHANGED
@@ -57,11 +57,11 @@ cd dr-detection
57
  pip install -r requirements.txt
58
  ```
59
 
60
- ## Step 1: Download the Dataset
61
 
62
  There are two ways to download the dataset:
63
 
64
- ### First Way: Downloading as a Complete Zip File
65
 
66
  ```bash
67
  kaggle competitions download -c diabetic-retinopathy-detection
@@ -71,7 +71,7 @@ unzip diabetic-retinopathy-detection.zip -d data/diabetic-retinopathy-detection
71
  rm diabetic-retinopathy-detection.zip
72
  ```
73
 
74
- ### Second Way: Downloading as Parts
75
 
76
  ```bash
77
  ./scripts/download-dr-dataset.sh
@@ -80,7 +80,7 @@ rm diabetic-retinopathy-detection.zip
80
  ./scripts/merge_and_extract.sh
81
  ```
82
 
83
- ## Step 2: Preprocess Images
84
 
85
  Once the dataset is downloaded, preprocess the images to crop and resize them.
86
 
@@ -94,7 +94,7 @@ python scripts/crop_and_resize.py --src data/diabetic-retinopathy-dataset/train
94
  python scripts/crop_and_resize.py --src data/diabetic-retinopathy-dataset/test data/diabetic-retinopathy-dataset/resized/test
95
  ```
96
 
97
- ## Step 3: Split Data and Save to CSV
98
 
99
  Finally, split the data into train and validation sets and save them to CSV files.
100
 
@@ -102,6 +102,54 @@ Finally, split the data into train and validation sets and save them to CSV file
102
  python scripts/split_dataset.py
103
  ```
104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  ## Gradio - Diabetic Retinopathy Detection App
106
  <!--
107
  <iframe src="https://bhimrazy-diabetic-retinopathy-detection.hf.space" frameborder="0" width="1920" height="1080"></iframe>
 
57
  pip install -r requirements.txt
58
  ```
59
 
60
+ ### Step 1: Download the Dataset
61
 
62
  There are two ways to download the dataset:
63
 
64
+ #### First Way: Downloading as a Complete Zip File
65
 
66
  ```bash
67
  kaggle competitions download -c diabetic-retinopathy-detection
 
71
  rm diabetic-retinopathy-detection.zip
72
  ```
73
 
74
+ #### Second Way: Downloading as Parts
75
 
76
  ```bash
77
  ./scripts/download-dr-dataset.sh
 
80
  ./scripts/merge_and_extract.sh
81
  ```
82
 
83
+ ### Step 2: Preprocess Images
84
 
85
  Once the dataset is downloaded, preprocess the images to crop and resize them.
86
 
 
94
  python scripts/crop_and_resize.py --src data/diabetic-retinopathy-dataset/test data/diabetic-retinopathy-dataset/resized/test
95
  ```
96
 
97
+ ### Step 3: Split Data and Save to CSV
98
 
99
  Finally, split the data into train and validation sets and save them to CSV files.
100
 
 
102
  python scripts/split_dataset.py
103
  ```
104
 
105
+ ### Training Model and Monitoring Progress with TensorBoard
106
+
107
+ In the previous section, we covered how to set up your dataset and configure your training pipeline using a `Config` class. Now, let's dive into training your model and monitoring its progress using TensorBoard.
108
+
109
+ #### Exploring Data Transformations and Augmentations
110
+
111
+ If you're looking for examples of data transformations and augmentations, you can explore the provided `notebook.ipynb` file. This notebook contains various examples of data preprocessing techniques, such as resizing, cropping, rotation, and more.
112
+
113
+ To open and explore the notebook:
114
+ 1. Navigate to the directory containing the `notebook.ipynb` file.
115
+ 3. Open the notebook and run the cells to see different transformation and augmentation examples.
116
+
117
+
118
+ #### Training the Model
119
+
120
+ To train your model, you can use the provided `train.py` script. Make sure you have set up your environment correctly and installed all dependencies as mentioned earlier. Here's how you can run the training pipeline:
121
+
122
+ 1. Open your terminal or command prompt.
123
+ 2. Navigate to the directory containing the `train.py` script.
124
+ 3. Run the following command:
125
+
126
+ ```bash
127
+ python train.py
128
+ ```
129
+
130
+ This command will execute the training script and start training your model based on the parameters specified in your `Config` class.
131
+
132
+ #### Monitoring Training Progress with TensorBoard
133
+
134
+ TensorBoard is a powerful tool for visualizing and monitoring the training process. You can use it to track metrics such as loss, accuracy, and learning rate over time, as well as visualize model graphs and embeddings.
135
+
136
+ To load TensorBoard logs and monitor your training progress:
137
+
138
+ 1. Ensure you have TensorBoard installed. You can install it via pip:
139
+
140
+ ```bash
141
+ pip install tensorboard
142
+ ```
143
+
144
+ 2. Once your model starts training, TensorBoard logs will be generated in the specified directory (e.g., `"logs/"`). You can launch TensorBoard using the following command:
145
+
146
+ ```bash
147
+ tensorboard --logdir=logs/
148
+ ```
149
+
150
+ This command will start a TensorBoard server locally, allowing you to view your training metrics and visualizations in your web browser.
151
+
152
+
153
  ## Gradio - Diabetic Retinopathy Detection App
154
  <!--
155
  <iframe src="https://bhimrazy-diabetic-retinopathy-detection.hf.space" frameborder="0" width="1920" height="1080"></iframe>