AnujPanthri / Image-Colorization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<<<<<<< HEAD


title: Image Colorization emoji: 🐒 colorFrom: purple colorTo: yellow sdk: docker pinned: false license: apache-2.0 app_port: 5000

hugging face config

9806df710f7850bef4ac174b66af98a07744ef4b

Image Colorization

==============================

An deep learning based Image Colorization project.

FINDINGS

  • the task we want to learn is image-colorization but we can accompolish that by doing different types of tasks, I call these sub-task, in our content they could be like regression based image colorization, classification(by binning) based colorization, GAN based colorization, image colorization + scene classication(Let there be colors research paper did this).
  • based on analysis and while I was trying to come up with a project file structure I came to know that the data, model, loss, metrics, dataloader all these are very coupled while dealing with a particular task(image-colorization) but when we talk about a sub-task we have much more freedom.
  • within a sub-task(e.g., regression-unet-learner) we already made a set of rules and now we can use different models without changing the data, or we can change different datasets while using the same model, so it is important to fix the sub-task we want to do first.
  • so making a folder for each sub-task seems right as a sub-task has high cohesion and no coupling with any other sub-task.

RULES

  • use lower_snake_case for functions
  • use lower_snake_case for file_name & folder names
  • use UpperCamelCase for class names
  • sub-task name should be in lower-kebab-case

Project File Structure


.
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md          <- The top-level README for developers using this project.
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ external       <- Data from third party sources.
β”‚   β”œβ”€β”€ interim        <- Intermediate data that has been transformed.
β”‚   β”œβ”€β”€ processed      <- The final, canonical data sets for modeling.
β”‚   └── raw            <- The original, immutable data dump.
β”œβ”€β”€ models/             <- Trained models
β”œβ”€β”€ notebooks/          <- Jupyter notebooks
β”œβ”€β”€ configs/
β”‚   β”œβ”€β”€ experiment1.yaml
β”‚   β”œβ”€β”€ experiment2.yaml
β”‚   β”œβ”€β”€ experiment3.yaml
β”‚   └── ...
└── src/
    β”œβ”€β”€ sub_task_1/
    β”‚   β”œβ”€β”€ validate_config.py
    β”‚   β”œβ”€β”€ data/
    β”‚   β”‚   β”œβ”€β”€ register_datasets.py
    β”‚   β”‚   β”œβ”€β”€ datasets/
    β”‚   β”‚   β”‚   β”œβ”€β”€ dataset1.py
    β”‚   β”‚   β”‚   └── dataset2.py
    β”‚   β”œβ”€β”€ model/
    β”‚   β”‚   β”œβ”€β”€ base_model_interface.py
    β”‚   β”‚   β”œβ”€β”€ register_models.py
    β”‚   β”‚   β”œβ”€β”€ models/
    β”‚   β”‚   β”‚   β”œβ”€β”€ simple_model.py
    β”‚   β”‚   β”‚   └── complex_model.py
    β”‚   β”‚   β”œβ”€β”€ losses.py
    β”‚   β”‚   β”œβ”€β”€ metrics.py
    β”‚   β”‚   β”œβ”€β”€ callbacks.py
    β”‚   β”‚   └── dataloader.py
    β”‚   └── scripts/
    β”‚       β”œβ”€β”€ create_dataset.py
    β”‚       └── create_model.py
    β”œβ”€β”€ sub_task_2/
    β”‚   └── ...
    β”œβ”€β”€ sub_task_3/
    β”‚   └── ...
    β”œβ”€β”€ scripts/
    β”‚   β”œβ”€β”€ create_sub_task.py
    β”‚   β”œβ”€β”€ prepare_dataset.py
    β”‚   β”œβ”€β”€ visualize_dataset.py
    β”‚   β”œβ”€β”€ visualize_results.py
    β”‚   β”œβ”€β”€ train.py
    β”‚   β”œβ”€β”€ evaluate.py
    β”‚   └── inference.py
    └── utils/
        β”œβ”€β”€ data_utils.py
        └── model_utils.py

Project based on the cookiecutter data science project template. #cookiecutterdatascience

Kaggle API docs:- https://github.com/Kaggle/kaggle-api/blob/main/docs/README.md

Kaggle Commands:-

  • kaggle kernels pull anujpanthri/training-image-colorization-model -p kaggle/
  • kaggle kernels push -p kaggle/
  • echo "{"username":"$KAGGLE_USERNAME","key":"$KAGGLE_KEY"}" > kaggle.json

Docker Commands:-

  • docker buildx build --secret id=COMET_API_KEY,env=COMET_API_KEY -t testcontainer
  • docker run -it -p 5000:5000 -e COMET_API_KEY=$COMET_API_KEY testcontainer

Git Commands:-

  • git lfs migrate info --everything --include=".zip,.png,*.jpg"
  • git lfs migrate import --everything --include=".zip,.png,*.jpg"

Version 1:

  • im gonna skip logging for now and rather use print statements

Dataset

Result

About

License:MIT License


Languages

Language:Jupyter Notebook 99.5%Language:Python 0.5%Language:JavaScript 0.0%Language:CSS 0.0%Language:HTML 0.0%Language:Dockerfile 0.0%