SRCNN implementation for upsampling grayscale images of tire treads.
Project description
TreadSRCNN
This package provides SRCNN model implemented in PyTorch. This model is only intended for use on grayscale images, and was created as an extension to treadscan.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file treadSRCNN-0.1.4.tar.gz.
File metadata
- Download URL: treadSRCNN-0.1.4.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d4715f050d6b4655ab13a2751b15244f6f0a6150577bc94b61554b7a27b65dd
|
|
| MD5 |
7040475272e3b9484839ff643784f125
|
|
| BLAKE2b-256 |
3a2d9b3ded29aa64b56658a9a6b6def643cd4b8ed462e042c914d22ba310619c
|
File details
Details for the file treadSRCNN-0.1.4-py3-none-any.whl.
File metadata
- Download URL: treadSRCNN-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.2 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 |
d23c00bad313321814c0b497039bbc0ac00a99ce037bc2a3aa70d8194dabcc0c
|
|
| MD5 |
2afafa3e9c68e5e486e9ede2749f19e3
|
|
| BLAKE2b-256 |
b95d5cecfe5b6d9e5f0a002f8072c77f924e4d22f893feb4faea1fdce35e090e
|