Zum Inhalt springen
ModelAufgelistetExtern
Browse files

Cancer Image Generation

This is a Deep Convolutional Generative Adversarial Network (DCGAN) implemented in PyTorch. It is trained to generate synthetic images that resemble the target dataset distribution.

ArtOtherVersionRevision 9db5085CBewertung

Modellquelle

Art
Other
Dateigröße
2,66–50,5 MB
Version
vRevision 9db5085
Aktualisiert
27. Sept. 2026
Downloads
0
Quelle
Hugging Face

Quellenbeschreibung

Model Card for DCGAN (PyTorch)

Model Details

Model Description

This is a Deep Convolutional Generative Adversarial Network (DCGAN) implemented in PyTorch.
It is trained to generate synthetic images that resemble the target dataset distribution.

  • Developed by: Abhishek C.
  • Funded by [optional]: Self Funded
  • Shared by: None
  • Model type: Generative Adversarial Network (DCGAN)
  • Language(s): N/A (Image generation)
  • License: Apache-2.0
  • Finetuned from model [optional]: Not applicable (trained from scratch)

Uses

Direct Use

  • Generating synthetic images from random noise vectors (z ~ N(0,1)).
  • Data augmentation for research and experimentation.
  • Educational purposes to study GAN training and generative modeling.

Downstream Use

  • Fine-tuning the discriminator or generator on domain-specific datasets.
  • Using the pretrained generator as an initialization for conditional GANs.

Out-of-Scope Use

  • Medical or safety-critical applications without validation.
  • Misuse for generating harmful or misleading content.

Bias, Risks, and Limitations

  • Generated images may contain artifacts if training is insufficient.
  • Quality depends heavily on dataset diversity and size.
  • Model may amplify dataset biases.

Recommendations

  • Always evaluate generated images before downstream use.
  • Do not use in decision-critical tasks.
  • Use larger datasets for stable performance.

How to Get Started with the Model

import torch
from torch import nn

# Load pretrained generator (example structure)
class Generator(nn.Module):
    def __init__(self, nz=100, ngf=64, nc=3):
        super().__init__()
        self.main = nn.Sequential(
            nn.ConvTranspose2d(nz, ngf*8, 4, 1, 0, bias=False),
            nn.BatchNorm2d(ngf*8),
            nn.ReLU(True),
            nn.ConvTranspose2d(ngf*8, ngf*4, 4, 2, 1, bias=False),
            nn.BatchNorm2d(ngf*4),
            nn.ReLU(True),
            nn.ConvTranspose2d(ngf*4, ngf*2, 4, 2, 1, bias=False),
            nn.BatchNorm2d(ngf*2),
            nn.ReLU(True),
            nn.ConvTranspose2d(ngf*2, nc, 4, 2, 1, bias=False),
            nn.Tanh()
        )

    def forward(self, input):
        return self.main(input)

# Example usage
netG = Generator()
noise = torch.randn(16, 100, 1, 1)
fake_images = netG(noise)

Quellen

1 Quelle
Hugging FacePrimärVersion 9db5085ce781064fd4e0d3d66a0501bb7c11dd3f
huggingface.co/Abhishek2714C/Cancer_Image_Generation/tree/9db5085ce781064fd4e0d3d66a0501bb7c11dd3f

Verifiziert 31. Aug.

Download files

Modellartefakte

2 Artefakte

discriminator.pth

pth · 2,66 MB · SHA-256 a0b984cf93ab…3d29 · Hugging Face

Download file

generator.pth

pth · 50,5 MB · SHA-256 b3235ec06cea…821d · Hugging Face

Download file

Quellenauszüge

2 Auszüge

--- license: apache-2.0 language: - en metrics: - FID - IS pipeline_tag: unconditional-image-generation tags: - generative-adversarial-network - pytorch - dcgan - deep-learning --- # Model Card for DCGAN (PyTorch) ## Model Details ### Model Description This is a **Deep Convolutional Generative Adversarial Network (DCGAN)** implemented in **PyTorch**. It is trained to generate synthetic images that resemble the target dataset distribution. - **Developed by:** Abhishek C. - **Funded by [optional]:** Self Funded - **Shared by:** None - **Model type:** Generative Adversarial Network (DCGAN) - **Language(s):** N/A (Image generation) - **License:** Apache-2.0 - **Finetuned from model [optional]:** Not applicable (trained from scratch) --- ## Uses ### Direct Use - Generating synthetic images from random noise vectors (`z ~ N(0,1)`). - Data augmentation for research and experimentation. - Educational purposes to study GAN training and generative modeling. ### Downstream Use - Fine-tuning the discriminator or generator on domain-specific datasets. - Using the pretrained generator as an initialization for conditional GANs. ### Out-of-Scope Use - Medical or safety-critical applications without validation. - Misuse for generating harmful or misleading content. --- ## Bias, Risks, and Limitations - Generated images may contain artifacts if training is insufficient. - Quality depends heavily on dataset diversity and size. - Model may amplify dataset biases. ### Recommendations - Always evaluate generated images before downstream use. - Do not use in decision-critical tasks. - Use larger datasets for stable performance. --- ## How to Get Started with the Model ```python import torch from torch import nn # Load pretrained generator (example structure) class Generator(nn.Module): def __init__(self, nz=100, ngf=64, nc=3): super().__init__() self.main = nn.Sequential( nn.ConvTranspose2d(nz, ngf*8, 4, 1, 0, bias=False), nn.BatchNorm2d(ngf*8), nn.ReLU(True), nn.ConvTranspose2d(ngf*8, ngf*4, 4, 2, 1, bias=False), nn.BatchNorm2d(ngf*4), nn.ReLU(True), nn.ConvTranspose2d(ngf*4, ngf*2, 4, 2, 1, bias=False), nn.BatchNorm2d(ngf*2), nn.ReLU(True), nn.ConvTranspose2d(ngf*2, nc, 4, 2, 1, bias=False), nn.Tanh() ) def forward(self, input): return self.main(input) # Example usage netG = Generator() noise = torch.randn(16, 100, 1, 1) fake_images = netG(n...

Source context: 0 downloads · 1 likes · Pipeline unconditional-image-generation · Repo Abhishek2714C/Cancer_Image_Generation