Skip to main content

SRCNN implementation for upsampling grayscale images of tire treads.

Project description

TreadSRCNN

Treadscan is a Python package containing computer vision tools for extracting tire treads. Sometimes, the scanned treads are in lower quality, because a vehicle hasn't stopped in the correct position, or the camera was out of focus. Applying upsampling to these images might help mitigate these issues.

Example of occurence of lower resolution tire treads (vehicles stopped far away, in the other lane): Treadscan tire segmentation

Quick summary of this project is contained in this paper in the root of the repository. It was made as semestral work for Computational Intelligence Methods course at FIT CTU.

Example usage

import cv2
from TreadSRCNN import SRCNN

low_resolution_image = cv2.imread('low_resolution_image.png', cv2.IMREAD_GRAYSCALE)

# Pretrained models can be found in https://github.com/bohundan/treadscan-SRCNN/tree/main/pretrained_models
srcnn = SRCNN('pretrained_weights.pth')

# Factor determines the upscaling factor
# THe higher the batch_size, the more memory is consumed during upsampling 
# (my 6GiB VRAM GPU can do around 500 batch_size comfortably)
upsampled_image = srcnn.upsample(low_resolution_image, factor=4, batch_size=100)

Upsampling preview

There is some tradeoff between sharper image and added noise.

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

treadSRCNN-0.1.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

treadSRCNN-0.1.3-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file treadSRCNN-0.1.3.tar.gz.

File metadata

  • Download URL: treadSRCNN-0.1.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for treadSRCNN-0.1.3.tar.gz
Algorithm Hash digest
SHA256 24c53c04628c8507d46a2d565e4526062f0922c42d7f7a5df7d3aa77b371a4ed
MD5 26e9b7595ec000c72983e96a028632f2
BLAKE2b-256 b15803353cba4a2a8215d83ae7a9e4ffcb5faedd31fd64578ff1a6c5c2249bfc

See more details on using hashes here.

File details

Details for the file treadSRCNN-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: treadSRCNN-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for treadSRCNN-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7410c8c28741668aac6d04a463a75ee059b74680cea24a85466a6b78bbec4cd9
MD5 ad65c40904d4888daafaef3240251b01
BLAKE2b-256 de29e05024abaa91252eb68b6b4c74be16463d4192cfe6851dea714f1ff65ca3

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page