bennypepper commited on
Commit
c19c833
ยท
unverified ยท
1 Parent(s): 582ea6f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +65 -2
README.md CHANGED
@@ -1,2 +1,65 @@
1
- # Brain-Tumor-Segmentation
2
- Automated brain MRI segmentation and tumor localization using the Fuzzy C-Means (FCM) algorithm.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Here is the refined, "gold standard" `README.md` for your Fuzzy C-Means project. It follows the exact same professional structure we used for the Batik Detector, ensuring your portfolio looks incredibly consistent and recruiter-ready across all your repositories.
2
+
3
+ ```markdown
4
+ # Brain Tumor Segmentation using Fuzzy C-Means (FCM) ๐Ÿง 
5
+
6
+ ![Python](https://img.shields.io/badge/python-3.8+-blue.svg) ![OpenCV](https://img.shields.io/badge/OpenCV-4.5-blue.svg) ![scikit-fuzzy](https://img.shields.io/badge/scikit--fuzzy-0.4.2-orange.svg) ![Graphviz](https://img.shields.io/badge/Graphviz-2.49-lightgrey.svg)
7
+
8
+ An automated medical image analysis tool that applies the **Fuzzy C-Means (FCM)** soft clustering algorithm to segment brain MRI scans and highlight potential tumor regions.
9
+
10
+ ## ๐Ÿ“Œ Project Overview
11
+ Diagnosing brain tumors accurately from Magnetic Resonance Imaging (MRI) is critical but often subjective and time-consuming. This project provides an automated segmentation pipeline using Fuzzy Logic. By clustering pixel data into distinct tissue groups (background, healthy tissue, fluids, and potential tumors), this tool serves as a reliable aid for medical image analysis.
12
+
13
+ ## ๐Ÿ› ๏ธ Tech Stack & Tools
14
+ * **Language:** Python
15
+ * **Computer Vision:** OpenCV
16
+ * **Machine Learning / Fuzzy Logic:** scikit-fuzzy, NumPy
17
+ * **Visualization:** Matplotlib, Graphviz (for automated process mapping)
18
+ * **GUI / Interactions:** Tkinter
19
+
20
+ ## ๐Ÿš€ Key Features
21
+ * **Fuzzy C-Means Implementation:** Configured to dynamically group MRI pixels into 4 distinct clusters with a fuzziness parameter of 2.0, ideal for handling the blurred boundaries of medical tissues.
22
+ * **Automated Workflow Mapping:** Dynamically generates and displays Graphviz flowcharts mapping both the overall system process and the internal FCM algorithmic loops.
23
+ * **Interactive File Selection:** Built-in Tkinter GUI for seamless, user-friendly local image selection and processing.
24
+ * **Quantitative Evaluation:** Automatically calculates and outputs the Fuzzy Partition Coefficient (FPC) and objective function convergence to validate clustering quality.
25
+
26
+ ## ๐Ÿ“‚ Repository Structure
27
+ ```text
28
+ fcm-brain-tumor-segmentation/
29
+ โ”œโ”€โ”€ data/
30
+ โ”‚ โ””โ”€โ”€ sample_mri.jpg # Example MRI scans for testing
31
+ โ”œโ”€โ”€ src/
32
+ โ”‚ โ””โ”€โ”€ segment_fcm.py # Main execution script
33
+ โ”œโ”€โ”€ requirements.txt # Python dependencies
34
+ โ””โ”€โ”€ README.md
35
+ ```
36
+
37
+ ## ๐Ÿ’ป How to Run Locally
38
+
39
+ 1. **Clone the repository:**
40
+ ```bash
41
+ git clone [https://github.com/yourusername/fcm-brain-tumor-segmentation.git](https://github.com/yourusername/fcm-brain-tumor-segmentation.git)
42
+ cd fcm-brain-tumor-segmentation
43
+ ```
44
+
45
+ 2. **Install the required dependencies:**
46
+ ```bash
47
+ pip install -r requirements.txt
48
+ ```
49
+ *Note for Windows Users: Graphviz requires a system-level installation. If the executable is missing from your PATH, the script will open an interactive prompt to help you locate the `bin` folder automatically.*
50
+
51
+ 3. **Execute the segmentation script:**
52
+ ```bash
53
+ python src/segment_fcm.py
54
+ ```
55
+
56
+ ## ๐Ÿ“Š Results & Performance
57
+ The algorithm efficiently reached optimal convergence in **34 iterations** with a minimized objective function of **10,852,001.55**.
58
+ * **Fuzzy Partition Coefficient (FPC):** `0.9156` (A score highly close to 1.0, indicating exceptionally well-defined and compact clusters).
59
+ * **Visual Output:** The system outputs a side-by-side comparison of the original MRI, the isolated cluster labels, and a color-mapped segmentation where potential tumor mass is isolated.
60
+
61
+ ## ๐Ÿ”ฎ Future Development
62
+ * **Ground Truth Validation:** Compare algorithmic outputs against expert-annotated masks to calculate exact Accuracy, Specificity, and Dice Coefficients.
63
+ * **Skull Stripping Pipeline:** Introduce a pre-processing step to isolate brain tissue from the skull for improved clustering focus.
64
+ * **Texture Analysis Integration:** Expand feature extraction beyond pixel intensity to include tissue texture matrices.
65
+ ```