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.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

treadSRCNN-0.1.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: treadSRCNN-0.1.2.tar.gz
  • Upload date:
  • Size: 2.9 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.2.tar.gz
Algorithm Hash digest
SHA256 f584befdbb89ab54a92a90e2261d6cecb5dea9a3be7791f635f7bb312d814220
MD5 448b3f031af2b14c9a73eaed2386a811
BLAKE2b-256 cc827bcdd43531b3b518a9e61bf22e742d27ef1d2e3ffed1af70042957967160

See more details on using hashes here.

File details

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

File metadata

  • Download URL: treadSRCNN-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 68b7ffb7228d612f54ec01d240c8e156caa993184bee38f89d66e56d0b97d177
MD5 6181faf29970ade526a86107fa75f43c
BLAKE2b-256 4f067132a8c83704e4ce467c317b31bdce58318cd1a43b31b285f96ca2d77f65

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