How cameronfabbri/underwater-color-correction works
UGAN trains an image-to-image model to correct underwater color: paired distorted/clean images feed a selected generator and discriminator, and inference produces corrected images. A separate CycleGAN workflow generates underwater-style training imagery from clean photos; the repository also provides image, folder, underwater-specific, video, and latent-embedding workflows. Edges follow the excerpts, SOURCE INDEX references, or README; unsampled wiring is omitted where it cannot be verified.
Main entry points: tf_ops.py TensorFlow operations · train.py Correction trainer · data_ops.py Dataset and color ops · eval_one.py Single-image evaluation
Components 21
Data preparation
- CycleGAN image utilities
cyclegan/utils.py - Dataset and color ops
ops/data_ops.py
Model training
- CycleGAN runner
cyclegan/main.py - CycleGAN model
cyclegan/model.py - CycleGAN networks
cyclegan/module.py - CycleGAN operations
cyclegan/ops.py - Correction trainer
train.py - TensorFlow operations
ops/tf_ops.py - Pix2pix generator
nets/pix2pix.py - Alternate Pix2pix
nets/pix2pix_new.py - ResNet generator
nets/resnet.py
Image inference
- Single-image evaluation
eval_one.py - Image evaluation
eval.py - Folder evaluation
eval_folder.py - Underwater evaluation
underwater_eval.py
Media and analysis
- Video correction
convert_video.py - Embedding interpolation
embedding/embedding.py
Other components
- Researcher
- Clean images
- Underwater images
- Corrected imagery
Connections 40
- Researcher → CycleGAN runner: starts training
cyclegan/main.py - CycleGAN runner → CycleGAN model: creates model
cyclegan/main.py - CycleGAN model → CycleGAN networks: uses networks
cyclegan/model.py - CycleGAN networks → CycleGAN operations: uses operations
cyclegan/module.py - CycleGAN model → CycleGAN image utilities: loads and saves
cyclegan/model.py - Clean images → CycleGAN runner: provides clean domain
README.md - CycleGAN runner → Underwater images: generates style data
README.md - Researcher → Correction trainer: starts training
train.py - Underwater images → Correction trainer: provides distorted samples
README.md - Clean images → Correction trainer: provides clean samples
README.md - Correction trainer → Dataset and color ops: uses data operations
train.py - Correction trainer → TensorFlow operations: uses tensor operations
train.py - Correction trainer → Pix2pix generator: selects generator
train.py - Correction trainer → ResNet generator: selects generator
train.py - Alternate Pix2pix → TensorFlow operations: uses operations
nets/pix2pix_new.py - Pix2pix generator → TensorFlow operations: uses operations
nets/pix2pix.py - Researcher → Single-image evaluation: submits image
eval_one.py - Researcher → Image evaluation: runs evaluation
eval.py - Researcher → Folder evaluation: submits folder
eval_folder.py - Researcher → Underwater evaluation: runs evaluation
underwater_eval.py - Single-image evaluation → Dataset and color ops: uses image operations
eval_one.py - Image evaluation → Dataset and color ops: uses image operations
eval.py - Folder evaluation → Dataset and color ops: uses image operations
eval_folder.py - Underwater evaluation → Dataset and color ops: uses image operations
underwater_eval.py - Single-image evaluation → TensorFlow operations: uses tensor operations
eval_one.py - Image evaluation → TensorFlow operations: uses tensor operations
eval.py - Folder evaluation → TensorFlow operations: uses tensor operations
eval_folder.py - Underwater evaluation → TensorFlow operations: uses tensor operations
underwater_eval.py - Single-image evaluation → Corrected imagery: writes corrections
eval_one.py - Image evaluation → Corrected imagery: writes corrections
eval.py - Folder evaluation → Corrected imagery: writes corrections
eval_folder.py - Underwater evaluation → Corrected imagery: writes corrections
underwater_eval.py - Researcher → Video correction: provides video
convert_video.py - Video correction → TensorFlow operations: uses tensor operations
convert_video.py - Video correction → Dataset and color ops: uses image operations
convert_video.py - Video correction → Corrected imagery: produces corrected video
convert_video.py - Researcher → Embedding interpolation: runs interpolation
embedding/embedding.py - Embedding interpolation → TensorFlow operations: uses tensor operations
embedding/embedding.py - Embedding interpolation → Dataset and color ops: uses image operations
embedding/embedding.py - Embedding interpolation → Corrected imagery: writes interpolated images
embedding/embedding.py