fidder
fidder is a Python package for detecting and erasing gold fiducials in cryo-EM images.
Fiducials are detected using a pre-trained residual 2D U-Net at 8 Å/px. Segmented regions are replaced with white noise matching the local mean and global standard deviation of the image.
The package can be used from both Python and the command line.
Quickstart
Python
import mrcfile
import torch
from fidder.predict import predict_fiducial_mask
from fidder.erase import erase_masked_region
# load your image
image = torch.tensor(mrcfile.read('my_image_file.mrc'))
# use a pretrained model to predict a mask
mask, probabilities = predict_fiducial_mask(
image, pixel_spacing=1.35, probability_threshold=0.5
)
# erase fiducials
erased_image = erase_masked_region(image=image, mask=mask)
Command Line
# predict fiducial mask
fidder predict \
--input-image example.mrc \
--probability-threshold 0.5 \
--output-mask mask.mrc
# erase masked region
fidder erase \
--input-image example.mrc \
--input-mask mask.mrc \
--output-image erased.mrc
Installation
pip:
pip install fidder
Compatibility
If trying to use an 10.X CUDA runtime you may have to install older versions of
torch and pytorch-lightning, see
teamtomo/fidder#17 for details.
Notes
This package provides similar functionality to BoxNet from Warp when retrained for gold fiducial segmentation.
This package was developed to make this functionality available in a standalone, easy to install Python package. The architecture and training data preprocessing are based on the description in the Warp paper.
Metadata
Release files for fidder 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fidder-0.0.8.tar.gz | 21.0 kB | Without provenance | Details for fidder-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fidder-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for fidder-0.0.8-py3-none-any.whl |
Total release size: 45.9 kB
Release files / fidder-0.0.8.tar.gz
| Download URL | fidder-0.0.8.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09a3c82006b719a43250a72aa48c046b39459da529266336dcf0c8ebc010b5c2
|
|
BLAKE2b-256 checksum How to use checksums |
5911ed509f30ddd9a0eeb1008024fc7c61f216a51659dcb9a20256441ed9cd0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / fidder-0.0.8-py3-none-any.whl
| Download URL | fidder-0.0.8-py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4ebbdd89f1e7cefde0d06779d3216b6370996989c68caffc3ca2f4efd8fabc4
|
|
BLAKE2b-256 checksum How to use checksums |
759b01f49d68f1b18f28bef2569050924d0b0427fe3a0a50b122dc6e02bfcc97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for fidder 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.