Spaces:
Sleeping
Sleeping
Download OMRChecker/src/processors/interfaces/ImagePreprocessor.py from AswinMathew/ocr-omr-backend: direct link, hf CLI and curl.
- Browser
- Download file 611 Bytes
-
https://huggingface.co/spaces/AswinMathew/ocr-omr-backend/resolve/b8548e41b8564f039b676e99ab6ec00a3c238945/OMRChecker/src/processors/interfaces/ImagePreprocessor.py
- Command line
-
hf download hf://spaces/AswinMathew/ocr-omr-backend@b8548e41b8564f039b676e99ab6ec00a3c238945/OMRChecker/src/processors/interfaces/ImagePreprocessor.py
-
curl -L -o ImagePreprocessor.py https://huggingface.co/spaces/AswinMathew/ocr-omr-backend/resolve/b8548e41b8564f039b676e99ab6ec00a3c238945/OMRChecker/src/processors/interfaces/ImagePreprocessor.py
611 Bytes
| # Use all imports relative to root directory | |
| from src.processors.manager import Processor | |
| class ImagePreprocessor(Processor): | |
| """Base class for an extension that applies some preprocessing to the input image""" | |
| def __init__(self, *args, **kwargs): | |
| super().__init__(*args, **kwargs) | |
| def apply_filter(self, image, filename): | |
| """Apply filter to the image and returns modified image""" | |
| raise NotImplementedError | |
| def exclude_files(): | |
| """Returns a list of file paths that should be excluded from processing""" | |
| return [] | |