mobadara commited on
Commit
5b9fcb9
·
unverified ·
1 Parent(s): 54d9a81

Create README for notebooks directory

Browse files

Added instructions for downloading and ingesting the Kaggle Chest X-Ray dataset in the README.

Files changed (1) hide show
  1. notebooks/README.md +38 -0
notebooks/README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 📓 **Notebooks Directory**
2
+
3
+ This directory contains the core machine learning experiments, including Exploratory Data Analysis (EDA) and the PyTorch DenseNet121 fine-tuning pipeline.
4
+
5
+ **⚠️ Prerequisite:** Before executing these notebooks, you must download the 2GB Kaggle Chest X-Ray dataset into the project workspace. Because we use Google Colab for GPU training, follow the instructions below to ingest the data directly into your active Colab session.
6
+
7
+ ---
8
+
9
+ ## 🔑 **Step 1: Obtain Your Kaggle API Token**
10
+
11
+ To download the dataset programmatically, you need a personal Kaggle authentication token:
12
+ 1. Log in to your account at [Kaggle.com](https://www.kaggle.com/).
13
+ 2. Click your **Profile Picture** in the top right corner and select **Settings**.
14
+ 3. Scroll down to the **API** section.
15
+ 4. Click **Create New Token**.
16
+ 5. Copy the generated token string (it will look something like `KGAT_...`). Treat this string like a password.
17
+
18
+ ---
19
+
20
+ ## 📥 **Step 2: Ingest Data
21
+ ### a. Via Colab Terminal (Single Command)**
22
+
23
+ Google Colab now provides free terminal access. You can download, extract, and clean up the entire dataset by copying and pasting a single chained command.
24
+
25
+ 1. On the far left sidebar of your Colab interface, click the **Terminal icon** (`>_`).
26
+ 2. Copy the following block of code.
27
+ 3. **Replace `"your_actual_token_here"`** with your real Kaggle token.
28
+ 4. Paste it into the Colab terminal and press Enter:
29
+
30
+ ```bash
31
+ export KAGGLE_API_TOKEN="your_actual_token_here" && pip install -q kaggle && mkdir -p ../dataset && kaggle datasets download -d paultimothymooney/chest-xray-pneumonia -p ../dataset && unzip -q ../dataset/chest-xray-pneumonia.zip -d ../dataset && rm ../dataset/chest-xray-pneumonia.zip && echo "✅ Dataset successfully downloaded and extracted!"
32
+ ```
33
+ ### b. Local Shell (e.g. Ubuntu)
34
+ Run the following command from the project's root directory.
35
+ ```bash
36
+ chmod +x scripts/01_download_dataset.sh
37
+ ./scripts/01_download_dataset.sh
38
+ ```