Skip to main content

PyTorch-compatible dataset manager for BBBC datasets

Project description

BBBC Datasets - PyTorch Dataset Manager

Reposetory Header Image

📌 Overview

This package provides a PyTorch-compatible dataset manager for Broad Bioimage Benchmark Collection (BBBC) datasets.

It allows users to:

  • Download and manage BBBC datasets automatically
  • Load datasets as PyTorch Dataset objects
  • Handle 2D & 3D images properly
  • Support image augmentations via torchvision.transforms (#TODO)

🚀 Installation

Clone the Repository

git clone https://github.com/mario-koddenbrock/bbbc_datasets.git
cd bbbc_datasets

Install Dependencies

pip install -r requirements.txt

Dependencies:

  • torch, torchvision (Deep Learning Framework)
  • numpy, tifffile, opencv-python (Image Handling)
  • requests, matplotlib (Downloading & Visualization)

📂 Available Datasets

You can list all available datasets without downloading them:

python examples/load_dataset.py

Output:

📂 Available BBBC Datasets:
- BBBC003: DIC microscopy images of mouse embryos for segmentation analysis.
- BBBC004: Synthetic fluorescence microscopy images of nuclei with varying clustering probabilities.
- BBBC005: Simulated fluorescence microscopy images with varying focus blur.
- BBBC006: Z-stack fluorescence microscopy images of human U2OS cells.
- BBBC008: Dataset: Fluorescence microscopy images of human HT29 colon cancer cells.
- BBBC010: Live/dead assay of C. elegans exposed to pathogens.
- BBBC024: 3D Synthetic HL60 Cell Line Images with Varying Clustering Probability and SNR.
- BBBC027: 3D Synthetic Colon Tissue Images with Varying SNR.
- BBBC028: Polymerized Structures in Differential Interference Contrast (DIC) Microscopy.
- BBBC029: Synthetic Differential Interference Contrast (DIC) Images.
- BBBC032: 3D Mouse Embryo Blastocyst Cells.
- BBBC033: 3D Mouse Trophoblast Stem Cells.
- BBBC034: 3D Induced Pluripotent Human Stem Cells (hiPSC).
- BBBC035: Simulated HL60 Cells from the Cell Tracking Challenge.
- BBBC038: Kaggle 2018 Data Science Bowl - Nuclei Segmentation.
- BBBC039: Nuclei of U2OS Cells in a Chemical Screen.
- BBBC046: FiloData3D - Synthetic 3D Time-Lapse Imaging of A549 Cells with Filopodia.
- BBBC050: Nuclei of Mouse Embryonic Cells.

🎨 Visualizing Dataset Samples

Display First Image from Each Dataset

Requires downloading datasets first!
python examples/load_dataset.py

📥 Download and Load a Dataset

Load a Dataset as a PyTorch Dataset

from bbbc_datasets.datasets.bbbc004 import BBBC004
from torch.utils.data import DataLoader

# Load BBBC004 dataset
dataset = BBBC004()

# Create a DataLoader
dataloader = DataLoader(dataset, batch_size=4, shuffle=True)

# Iterate through data
for images, labels in dataloader:
    print(f"Batch shape: {images.shape}, Labels: {labels.shape if labels is not None else 'None'}")

🛠 Running Tests

Validate Dataset URLs

python -m unittest tests/test_dataset_urls.py
  • Checks if all dataset URLs are reachable 🌍

Verify Dataset Loading

python -m unittest tests/test_dataset_loading.py
  • Ensures datasets can be loaded and accessed correctly 🛠

📝 Up-next

  • Thinking of what is up next
  • Maybe integrating other datasets as cellpose, livecell, etc.

🙌 Contributing

Contributions are welcome! If you find issues or want to add new features, feel free to:

  • Submit a Pull Request
  • Report Issues in the GitHub Issues section

📜 License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bbbc_datasets-0.1.0.tar.gz (104.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bbbc_datasets-0.1.0-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file bbbc_datasets-0.1.0.tar.gz.

File metadata

  • Download URL: bbbc_datasets-0.1.0.tar.gz
  • Upload date:
  • Size: 104.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for bbbc_datasets-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4b321177bcddf347b54d51de8a7ea099a9c170dbd2a9c060a99e56db9fb3d08d
MD5 90153f34836bea79d78c846ee126f3f1
BLAKE2b-256 edf4f1efcb3b43d1b1fafe07e65c4c64cfa6efc3f455d5a0553cf19d3ab23184

See more details on using hashes here.

File details

Details for the file bbbc_datasets-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bbbc_datasets-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for bbbc_datasets-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 226890bfe5cbce17231188761c0b54ba819720da53eb2ed9b1cf8a924b0ef31f
MD5 bca592f895cb77bec6ff8b695b909cf3
BLAKE2b-256 a16e0af5ad51100b12a137ebfaaa3b89969a4eb977310049becf79c1dc5e2adb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page