xchem-chimp
CHiMP (Crystal Hits in My Plate) is a deep learning system to help researchers work with micrographs of protein crystallisation experiments. XChem CHiMP consists of one component:
1. CHiMP Detector. This uses an object detection network to find the position of any crystals and drops in the image and uses this information to calculate a coordinate for dispensing compound using the Echo.
Installation
pip install chimpflow chimpflow --version
Model file for xchem-chimp
The model file is saved in:
https://gitlab.diamond.ac.uk/xchem/xchem-chimp-models
This file is too large for github.
For GitHub pytest to find the file in its CI/CD Actions, this file has been uploaded to zenodo:
https://zenodo.org/record/7810708/2022-12-07_CHiMP_Mask_R_CNN_XChem_50eph_VMXi_finetune_DICT_NZ.pytorch
The tests/conftest.py fetches this file automatically.
Running
rm -rf detector_output
python -m detect_folder_chimp \
--echo --preview \
--num_classes=3 \
--MODEL_PATH=src/xchem_chimp/detector/model/2022-12-07_CHiMP_Mask_R_CNN_XChem_50eph_VMXi_finetune_DICT_NZ.pytorch \
--IMAGE_PATH=tests/SubwellImages/97wo_2021-09-14_RI1000-0276-3drop
you can expect something like:
20-Mar-23 08:09:21 - INFO - Loading libraries... 20-Mar-23 08:09:21 - DEBUG - Loading model from src/xchem_chimp/detector/model/2022-12-07_CHiMP_Mask_R_CNN_XChem_50eph_VMXi_finetune_DICT_NZ.pytorch 20-Mar-23 08:09:21 - INFO - Making directory for detector output: /27/xchem-chimp/detector_output 20-Mar-23 08:09:21 - DEBUG - extracting coordinates... 20-Mar-23 08:09:25 - DEBUG - create_detector_output_dict: 97wo_01A_1.jpg - Number of objects found: 33 20-Mar-23 08:09:25 - DEBUG - 1 drops, 32 crystals over prob threshold 20-Mar-23 08:09:26 - DEBUG - Extracting Echo coordinate from distance transform. 20-Mar-23 08:09:27 - DEBUG - Calculating well centroids... 20-Mar-23 08:09:27 - DEBUG - Loading background images 20-Mar-23 08:09:27 - DEBUG - Well centroid found at (504, 600)
Development questions
Is the folder src/xchem_chimp/detector/background_images needed in the distribution?
Where best to put model_file for unit testing?
Is torchvision a necessary dependency for runtime?
How are the model files built?
Why are there so many mypy problems in coord_generator.py and detector_utils.py?
How significant is this: DeprecationWarning: Please use gaussian_filter from the scipy.ndimage namespace, the scipy.ndimage.filters namespace is deprecated.
Do we need to keep anything in the zocalo directory?
Is there some example image where target_position is properly calculated?
Documentation
See https://www.cs.diamond.ac.uk/chimpflow for more detailed documentation.
Building and viewing the documents locally:
git clone git+https://gitlab.diamond.ac.uk/scisoft/bxflow/chimpflow.git cd chimpflow virtualenv /scratch/$USER/venv/chimpflow source /scratch/$USER/venv/chimpflow/bin/activate pip install -e .[dev] make -f .chimpflow/Makefile validate_docs browse to file:///scratch/$USER/venvs/chimpflow/build/html/index.html
Topics for further documentation:
TODO list of improvements
change log
Metadata
Release files for xchem-chimp 1.0.1
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 | |
|---|---|---|---|---|
| xchem-chimp-1.0.1.tar.gz | 1.4 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xchem_chimp-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / xchem-chimp-1.0.1.tar.gz
| Download URL | xchem-chimp-1.0.1.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1caba9520f7c2adcfd0388af7cd8f28faf6e5a4c36e8051971915356f483c971
|
|
BLAKE2b-256 checksum How to use checksums |
5b5c2e77b91a86aeb6d79e77369680c6b0f3fc99e005a954ba3d6297a4c11ac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / xchem_chimp-1.0.1-py3-none-any.whl
| Download URL | xchem_chimp-1.0.1-py3-none-any.whl |
|---|---|
| Size | 46.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4076662b0e458515c5ff8d2ef8c068d6134859c0273bd5fdc5f3f3e4ce06c52
|
|
BLAKE2b-256 checksum How to use checksums |
73ebcac079e6b946a39d271af521b2fde1cdf4a8bd59db097659e022da7f00a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Security for xchem-chimp 1.0.1
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.