Downloads · 30 days
148
46% of all-time downloads
scrollprize/ink_detection_pipeline
ink_detection_pipeline is a feature extraction model from scrollprize. Use it when you need embeddings to search or compare text. It is set up for transformers.
Downloads · 30 days
148
46% of all-time downloads
All-time downloads
321
Public
Parameters
38M
152 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors152 MB · 100%
From the Hugging Face model README
pip install -U vesuvius transformer timesformer-pytorch
vesuvius.accept_terms --yes
import vesuvius
import numpy as np
import matplotlib.pyplot as plt
from vesuvius import Volume
from transformers import pipeline
segment = Volume(20230827161847, normalize=True)
classifier = pipeline(model="scrollprize/ink_detection_pipeline", trust_remote_code=True, tile_size=64, stride=32, scale_factor=16)
prediction = classifier(np.transpose(segment[17:43, 200:5600,1000:4600],(1,2,0)).astype(np.float32)) # prediction shape ~ (512,512)
plt.imshow(prediction)