CycleGAN CCTV Noise Generator

Description

CycleGAN model trained to transform clean images into CCTV-style noisy images.

Repository Structure

β”œβ”€β”€ checkpoints/
β”‚   └── cyclegan_cctv/
β”‚       └── G_cctv.pth          # Generator model (Clean β†’ Noisy)
β”œβ”€β”€ outputs/
β”‚   └── cyclegan_cctv/          # Training outputs & visualizations
β”œβ”€β”€ coco_clean/                 # Original COCO images (1000 samples)
β”œβ”€β”€ coco_noisy/                 # CycleGAN-generated noisy images (1000 samples)
└── README.md

Usage

Load Generator Model

from huggingface_hub import hf_hub_download
import torch

# Download model
model_path = hf_hub_download(
    repo_id="dtann08/cyclegan-cctv-noise-generator",
    filename="checkpoints/cyclegan_cctv/G_cctv.pth"
)

# Load model (define Generator class first)
G_AB = Generator(input_nc=3, output_nc=3, n_residual_blocks=6)
G_AB.load_state_dict(torch.load(model_path, map_location='cpu'))
G_AB.eval()

Download Dataset (Clean & Noisy pairs)

from huggingface_hub import snapshot_download

# Download specific folders
snapshot_download(
    repo_id="dtann08/cyclegan-cctv-noise-generator",
    allow_patterns=["coco_clean/*", "coco_noisy/*"],
    local_dir="./data"
)

Training Details

  • Architecture: ResNet-based CycleGAN
  • Image Size: 128x128
  • Epochs: 50
  • Loss Functions: Adversarial + Cycle Consistency + Identity

License

MIT License

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support