help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
medical-imaging
RSK World
medical-imaging
Medical Imaging Dataset - X-ray CT Scan MRI + Disease Detection + Computer-Aided Diagnosis + Medical AI
medical-imaging
  • __pycache__
  • data
  • scripts
  • .gitignore475 B
  • CONTRIBUTING.md1.7 KB
  • CT_MRI_LOCATION.md6 KB
  • DATASET_SUMMARY.md4.1 KB
  • DISCLAIMER.md2.1 KB
  • DOWNLOAD_INSTRUCTIONS.md7.5 KB
  • ERROR_CHECK_REPORT.md4.2 KB
  • FINAL_DATASET_SUMMARY.md5.8 KB
  • LICENSE784 B
  • PROJECT_IMAGE_NOTE.md1.2 KB
  • PROJECT_SUMMARY.md3.9 KB
  • QUICK_START.md2.9 KB
  • README.md4.3 KB
  • RELEASE_NOTES.md5 KB
  • create_directories.py1.5 KB
  • download_all_ct_mri.py12.2 KB
  • download_all_datasets.py8.9 KB
  • download_ct_mri_datasets.py10.1 KB
  • download_ct_mri_kaggle.bat1.5 KB
  • download_from_github.py8.1 KB
  • download_helper.py4.4 KB
  • download_kaggle_datasets.bat2.1 KB
  • download_public_datasets.py16.7 KB
  • download_summary.json211 B
  • example_usage.py2.7 KB
  • generate_sample_data.py15.9 KB
  • index.html43.2 KB
  • medical-imaging.zip2.1 MB
  • organize_medmnist.py1.3 KB
  • organize_mri_data.py584 B
  • project_info.json1.4 KB
  • requirements.txt492 B
  • setup.py2 KB
RELEASE_NOTES.mdusers.ymlboot.rbdownload_from_github.py
RELEASE_NOTES.md
Raw Download

RELEASE_NOTES.md

# Medical Imaging Dataset - Release Notes

## Version 1.0.0 - Initial Release

**Release Date:** January 2025
**Repository:** [https://github.com/rskworld/medical-imaging](https://github.com/rskworld/medical-imaging)

---

## 🎉 What's New

### Complete Medical Imaging Dataset
This is the initial release of the Medical Imaging Dataset project, featuring a comprehensive collection of medical images with diagnostic labels and annotations.

### Dataset Contents
- **30 Medical Images Total:**
- 10 X-ray images (chest, abdomen, extremity)
- 10 CT scan images (head, chest, abdomen)
- 10 MRI images (brain, spine, joints)

- **Diagnostic Labels:**
- JSON-format labels for all images
- Diagnostic information and confidence scores
- Anonymized patient metadata
- Annotations and findings

---

## ✨ Features

### 1. Data Loading & Management
- ✅ Load X-ray, CT scan, and MRI images
- ✅ Automatic image-label pairing
- ✅ Support for PNG, JPG, JPEG formats
- ✅ DICOM file support (with pydicom)
- ✅ JSON label loading with error handling

### 2. Advanced Image Preprocessing
- ✅ CLAHE (Contrast Limited Adaptive Histogram Equalization)
- ✅ Modality-specific preprocessing (X-ray, CT, MRI)
- ✅ Noise reduction (Gaussian blur, Median filter, Bilateral filter)
- ✅ Histogram equalization
- ✅ Pixel normalization [0, 1]
- ✅ Window/Level transformation
- ✅ Batch preprocessing support

### 3. Medical Image Visualization
- ✅ Single image visualization with annotations
- ✅ Batch image grid visualization
- ✅ Before/After preprocessing comparison
- ✅ Dataset statistics charts (bar/pie)
- ✅ Diagnostic label overlay display
- ✅ Confidence score visualization

### 4. Dataset Statistics
- ✅ Image count per modality
- ✅ Total dataset statistics
- ✅ Visual statistics plots
- ✅ Bar charts and pie charts

---

## 📦 Included Files

### Python Scripts
- `scripts/load_data.py` - Data loading functions
- `scripts/preprocess.py` - Image preprocessing
- `scripts/visualize.py` - Visualization functions
- `example_usage.py` - Usage examples
- `generate_sample_data.py` - Sample data generator

### Documentation
- `README.md` - Main documentation
- `QUICK_START.md` - Quick start guide
- `DOWNLOAD_INSTRUCTIONS.md` - Download instructions
- `PROJECT_SUMMARY.md` - Project summary
- Complete API documentation in code

### Data Files
- 30 medical images (10 X-ray, 10 CT scan, 10 MRI)
- Corresponding JSON label files
- Example label templates

### Web Interface
- `index.html` - Interactive demo page with image gallery
- Responsive design
- All features visible and documented

### Downloads
- `medical-imaging.zip` - Complete dataset package (2.11 MB)

---

## 🚀 Quick Start

1. **Install Dependencies:**
```bash
pip install -r requirements.txt
```

2. **Load Dataset:**
```python
from scripts.load_data import MedicalImagingDataset

dataset = MedicalImagingDataset(data_path='./data')
xray_images, xray_labels = dataset.load_xray_images()
```

3. **Preprocess Images:**
```python
from scripts.preprocess import preprocess_image

processed = preprocess_image('image.png', image_type='xray')
```

4. **Visualize:**
```python
from scripts.visualize import visualize_medical_image

visualize_medical_image('image.png', 'label.json')
```

---

## 📊 Dataset Statistics

- **Total Images:** 30
- **X-ray Images:** 10
- **CT Scan Images:** 10
- **MRI Images:** 10
- **Label Coverage:** 100%
- **Formats Supported:** PNG, JPG, JPEG, DICOM

---

## 🛠️ Technologies Used

- **Python 3.7+**
- **NumPy** - Numerical computing
- **PIL (Pillow)** - Image processing
- **OpenCV** - Computer vision
- **Matplotlib** - Visualization
- **pydicom** - DICOM file support

---

## 📝 Use Cases

- Medical image analysis
- Disease detection
- Computer-aided diagnosis
- Healthcare AI model training
- Deep learning research
- Computer vision applications

---

## ⚠️ Important Notes

- **Educational Use Only:** This dataset is for educational and research purposes
- **Not for Medical Diagnosis:** Always consult medical professionals for actual diagnosis
- **License:** See LICENSE file for details
- **Disclaimer:** See DISCLAIMER.md for full medical disclaimer

---

## 🔗 Links

- **Repository:** [https://github.com/rskworld/medical-imaging](https://github.com/rskworld/medical-imaging)
- **Website:** [https://rskworld.in](https://rskworld.in)
- **Contact:** help@rskworld.in

---

## 👥 Credits

- **Founder:** Molla Samser
- **Designer & Tester:** Rima Khatun
- **Organization:** RSK World

---

## 📄 License

Content used for educational purposes only. Please refer to the LICENSE file for more information.

---

**Thank you for using Medical Imaging Dataset!** 🎊

For support, visit [rskworld.in](https://rskworld.in) or contact help@rskworld.in

download_from_github.py
Raw Download
Find: Go to:
"""
Medical Imaging Dataset - GitHub Dataset Downloader
====================================================

Project: Medical Imaging Dataset
Website: https://rskworld.in
Contact: help@rskworld.in, support@rskworld.in
Phone: +91 93305 39277
Founder: Molla Samser
Designer & Tester: Rima Khatun

This script downloads medical imaging datasets directly from GitHub repositories.
"""

import os
import requests
import zipfile
import shutil
from pathlib import Path
from urllib.parse import urlparse


# GitHub repositories with medical imaging data
GITHUB_DATASETS = {
    "covid_chestxray": {
        "name": "COVID-19 Chest X-ray Dataset",
        "repo": "ieee8023/covid-chestxray-dataset",
        "description": "Chest X-rays for COVID-19 detection",
        "license": "MIT",
        "images": "~100+ images",
        "direct_download": True
    },
    "medical_imaging": {
        "name": "Medical Imaging Datasets",
        "repo": "v7labs/medical-imaging-datasets",
        "description": "Collection of medical imaging datasets",
        "license": "Various",
        "images": "Multiple",
        "direct_download": True
    }
}


def download_github_repo(repo_name, output_dir="data/temp"):
    """
    Download a GitHub repository as ZIP.
    
    Args:
        repo_name: Repository name in format "owner/repo"
        output_dir: Directory to save the downloaded files
    """
    url = f"https://github.com/{repo_name}/archive/refs/heads/master.zip"
    
    # Try main branch if master doesn't work
    alt_url = f"https://github.com/{repo_name}/archive/refs/heads/main.zip"
    
    output_path = Path(output_dir)
    output_path.mkdir(parents=True, exist_ok=True)
    
    zip_path = output_path / f"{repo_name.replace('/', '_')}.zip"
    
    print(f"Downloading {repo_name}...")
    print(f"URL: {url}")
    
    try:
        response = requests.get(url, stream=True, timeout=30)
        if response.status_code == 404:
            print("Master branch not found, trying main branch...")
            response = requests.get(alt_url, stream=True, timeout=30)
            url = alt_url
        
        if response.status_code == 200:
            total_size = int(response.headers.get('content-length', 0))
            downloaded = 0
            
            with open(zip_path, 'wb') as f:
                for chunk in response.iter_content(chunk_size=8192):
                    if chunk:
                        f.write(chunk)
                        downloaded += len(chunk)
                        if total_size > 0:
                            percent = (downloaded / total_size) * 100
                            print(f"\rProgress: {percent:.1f}%", end='', flush=True)
            
            print(f"\nDownloaded to: {zip_path}")
            
            # Extract ZIP file
            print("Extracting...")
            extract_dir = output_path / repo_name.split('/')[-1]
            with zipfile.ZipFile(zip_path, 'r') as zip_ref:
                zip_ref.extractall(output_path)
            
            print(f"Extracted to: {extract_dir}")
            return str(extract_dir)
        else:
            print(f"Error: HTTP {response.status_code}")
            return None
            
    except Exception as e:
        print(f"Error downloading: {e}")
        return None


def download_covid_dataset():
    """Download COVID-19 chest X-ray dataset from GitHub."""
    print("=" * 60)
    print("Downloading COVID-19 Chest X-ray Dataset")
    print("=" * 60)
    print()
    
    repo = "ieee8023/covid-chestxray-dataset"
    extract_path = download_github_repo(repo, "data/temp/covid")
    
    if extract_path:
        # Organize images
        source = Path(extract_path)
        target_images = Path("data/xray/images")
        target_labels = Path("data/xray/labels")
        
        target_images.mkdir(parents=True, exist_ok=True)
        target_labels.mkdir(parents=True, exist_ok=True)
        
        # Find and copy images
        image_extensions = ['.png', '.jpg', '.jpeg']
        image_count = 0
        
        for ext in image_extensions:
            for img_file in source.rglob(f'*{ext}'):
                if img_file.is_file() and 'images' in str(img_file):
                    dest = target_images / img_file.name
                    if not dest.exists():
                        shutil.copy2(img_file, dest)
                        image_count += 1
        
        print(f"\nOrganized {image_count} images to data/xray/images/")
        return True
    
    return False


def download_medmnist_images():
    """Download sample images from MedMNIST (if available via direct link)."""
    print("=" * 60)
    print("MedMNIST Dataset Information")
    print("=" * 60)
    print()
    print("MedMNIST is available via:")
    print("1. Kaggle: https://www.kaggle.com/datasets/andrewmvd/medical-mnist")
    print("2. Official: https://medmnist.com/")
    print()
    print("For direct download, please visit the official website or use Kaggle API.")
    print()


def list_public_sources():
    """List additional public sources for medical imaging data."""
    print("=" * 60)
    print("Additional Public Medical Imaging Data Sources")
    print("=" * 60)
    print()
    
    sources = [
        {
            "name": "The Cancer Imaging Archive (TCIA)",
            "url": "https://www.cancerimagingarchive.net/",
            "description": "Open-access database of medical images for cancer research",
            "modalities": "CT, MRI, PET",
            "access": "Free registration required"
        },
        {
            "name": "Radiopaedia",
            "url": "https://radiopaedia.org/",
            "description": "Educational radiology resource with case studies",
            "modalities": "X-ray, CT, MRI, Ultrasound",
            "access": "Free, educational use"
        },
        {
            "name": "OpenNeuro",
            "url": "https://openneuro.org/",
            "description": "Open-science database for brain imaging",
            "modalities": "MRI, fMRI, EEG",
            "access": "Free, open access"
        },
        {
            "name": "Stanford AIMI",
            "url": "https://aimi.stanford.edu/resources/shared-datasets",
            "description": "Stanford AI in Medicine & Imaging shared datasets",
            "modalities": "Multiple",
            "access": "Free for research"
        },
        {
            "name": "MIDRC",
            "url": "https://www.midrc.org/",
            "description": "Medical Imaging Data Resource Center",
            "modalities": "CT, X-ray, MRI",
            "access": "Free registration"
        },
        {
            "name": "MedMNIST",
            "url": "https://medmnist.com/",
            "description": "Large-scale standardized biomedical images",
            "modalities": "Multiple (12 2D + 6 3D datasets)",
            "access": "Free, direct download"
        }
    ]
    
    for source in sources:
        print(f"Source: {source['name']}")
        print(f"  URL: {source['url']}")
        print(f"  Description: {source['description']}")
        print(f"  Modalities: {source['modalities']}")
        print(f"  Access: {source['access']}")
        print()


def main():
    """Main function."""
    print("=" * 60)
    print("Medical Imaging Dataset - GitHub Downloader")
    print("=" * 60)
    print()
    print("This script helps download publicly available medical imaging")
    print("datasets from GitHub and other public sources.")
    print()
    print("Options:")
    print("1. Download COVID-19 Chest X-ray Dataset (GitHub)")
    print("2. List additional public data sources")
    print("3. Show MedMNIST information")
    print()
    
    choice = input("Enter option (1-3) or 'q' to quit: ").strip()
    
    if choice == '1':
        download_covid_dataset()
    elif choice == '2':
        list_public_sources()
    elif choice == '3':
        download_medmnist_images()
    elif choice.lower() == 'q':
        print("Exiting...")
    else:
        print("Invalid choice.")


if __name__ == '__main__':
    main()

248 lines•8.1 KB
python
🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer