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
Built Distribution
File details
Details for the file treadSRCNN-0.1.1.tar.gz
.
File metadata
- Download URL: treadSRCNN-0.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44cf2ac729496babc30fd67f496e338156c161d370b42bd8a21d4ace388e50d1 |
|
MD5 | 30a3b9eba0ec15b255d8d50b69076fab |
|
BLAKE2b-256 | 00ae3ab29dabe033560762616bd32bd17f5ef93bb0a7421ef3828a4286c8bbc5 |
File details
Details for the file treadSRCNN-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: treadSRCNN-0.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e68f439385cc94360159a19e10621f82debc08e3d5fa2f78ea76f4540f9c3026 |
|
MD5 | 3888a5b6113895ead141ba58b491983b |
|
BLAKE2b-256 | 77306cb432b485a4315a6c92f7b33ede6b4ad8dc833671577aa75ced59a78d21 |