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):

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: treadSRCNN-0.1.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.tar.gz
Algorithm Hash digest
SHA256 61409b5c07ff161c73a39c259b02f8d590d6e3977c97ddc7bd61c0863410557b
MD5 63f10f8dd535afbb5806fa3bf0fb8712
BLAKE2b-256 d140d964800e82e303f4d8abd8fdce6df0938207745fb6332fa51925d1ed9ec7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: treadSRCNN-0.1-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-py3-none-any.whl
Algorithm Hash digest
SHA256 92dfd202c2c50dff956a3818dac1c158b555898d9f6dcd0411b4e5e3101c7153
MD5 c7fa583b0e9fd77c3b02dd0641d0d2e3
BLAKE2b-256 4b2dbf5f5ebe2d7d4c4e22fe79aea8a51cd6514e11236ff947aa50a311583161

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