Skip to main content

Library that colorizes gray STEM imagess using deep convolutional neural networks.

Project description

Color Spray

STEM images colorization using Deep Convolutional Neural Networks.

Installing

A. Install and update using pip:

pip3 install color-spray

Or

git checkout https://github.com/fengwang/color_spray.git
cd color_spray
python3 -m pip install -e .

B. Dowload pretrained model files from https://drive.google.com/drive/folders/1dl-iNgROmSv71EpzNalh97zksKIBc90u?usp=sharing, place them in your home folder, under path .color_spray/model.

Usage

Command line:

color_spray INPUT_GRAY_IMAGE_PATH OUTPUT_RGB_IMAGE_PATH

Using Python API:

# uncomment the follow three lines if you have a Nvidia GPU but you do not want to enable it.
#import os
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
#os.environ["CUDA_VISIBLE_DEVICES"]=''

from color_spray import color_spray
rgb_image = color_spray( './a_gray_image.png', './an_rgb_image.png' )

Details

  • The training images are downloaded from PEXEL.

License

  • BSD

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

color_spray-0.1.0.tar.gz (816.3 kB view details)

Uploaded Source

Built Distribution

color_spray-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: color_spray-0.1.0.tar.gz
  • Upload date:
  • Size: 816.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for color_spray-0.1.0.tar.gz
Algorithm Hash digest
SHA256 52ae5c616e30403386d5e096fb767ab59646b13eb08fdcc3853fa2d0877d0c54
MD5 6c2460042dbf434eb9a348636599e772
BLAKE2b-256 570f49e0e53692cfda1878ccb1ec58c27e957b3e9670acf433467723ac754129

See more details on using hashes here.

File details

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

File metadata

  • Download URL: color_spray-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for color_spray-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90aa6c15f65950e7ac289265fad6fd7a7a29ddb0d1a7e37197efc3e71b01143f
MD5 601d37bdcaeab6861b7ff82f2a3a27fd
BLAKE2b-256 ea9d0e599d8f4a7b43ab417a8eb6edb4533ffbf0ee8086421f5fc70261ec5f57

See more details on using hashes here.

Supported by

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