GithubHelp home page GithubHelp logo

scivision-gallery / cryoem-object-detection Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 3.0 21.45 MB

A notebook demonstrating object detection in cryoEM micrographs

License: MIT License

Jupyter Notebook 100.00%

cryoem-object-detection's Introduction

Object Detection in CryoEM Datasets

Binder

Object detection in a synthetic dataset with ODIN

Detection of objects in a synthetic image with ODIN. Bounding boxes: purple - ground truth, yellow - prediction.

Abstract

Electron Microscopy aims to image particles (e.g., proteins, molecules) on a near atomic resolution. However, with great resolution comes low signal-to-noise ratio. As such, computer vision models need to be trained on noisy datasets in order to detect objects.

CryoEM pipeline from raw image (left, individual particle highlighted in green) to the molecular structure (right)

The structure of the objects being imaged is calculated by averaging hundreds if not thousands of frames of said object in different orientations, rotations and positions. The dataset generated is, consequently, large - usually, the pre-processed images (or with some degree of processing like motion correction) are uploaded onto an online database called EMPIAR.

In this notebook, we use scivision to load memory-friendly synthetic data (AlphabetSoup with a noise filter) and real data from the online database of EM images (EMPIAR), and run them through our pre-trained Object Detection in Images with Noise (odin) model.

How to run

  • Open the notebook in an interactive session in your browser with Binder: Launch Binder

To run the notebook on your local machine:

  • Open your terminal
  • Check your conda installation with conda --version. If you don't have conda, install it by following these instructions
  • Clone the repository into your current folder: git clone https://github.com/scivision-gallery/cryoEM-object-detection.git
  • Change directory to the cloned repository, cd cryoEM-object-detection
  • Install the dependencies in a new environment conda env create -f environment.yml
  • Activate the installed environment, conda activate cryoEM-scivision-py39
  • Launch the jupyter interface of your preference by running either jupyter notebook or jupyter lab

The models and data sources used in this notebook

cryoem-object-detection's People

Contributors

ots22 avatar mooniean avatar quantumjot avatar ifenton avatar

Stargazers

 avatar

Watchers

 avatar Scott Hosking avatar Alejandro © avatar

cryoem-object-detection's Issues

Binder fails to launch

When clicking the Binder link at the ReadMe frontpage, this error occurs when building the docker image:

Step 40/51 : RUN TIMEFORMAT='time: %3R' bash -c 'time ${MAMBA_EXE} env update -p ${NB_PYTHON_PREFIX} --file "environment.yml" && time ${MAMBA_EXE} clean --all -f -y && ${MAMBA_EXE} list -p ${NB_PYTHON_PREFIX} '
 ---> [Warning] Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
 ---> Running in 11f06494676f


Looking for: ['abseil-cpp=20210324.2', 'absl-py=1.0.0', 'aiohttp=3.8.1', 'aiosignal=1.2.0', 'aom=3.3.0', 'appdirs=1.4.4', 'argon2-cffi=21.3.0', 'argon2-cffi-bindings=21.2.0', 'asciitree=0.3.3', 'asttokens=2.0.5', 'astunparse=1.6.3', 'async-timeout=4.0.2', 'attrs=21.4.0', 'backcall=0.2.0', 'backports=1.0', 'backports.functools_lru_cache=1.6.4', 'beautifulsoup4=4.10.0', 'bleach=4.1.0', 'blinker=1.4', 'blosc=1.21.0', 'bokeh=2.4.2', 'brotli=1.0.9', 'brotli-bin=1.0.9', 'brotlipy=0.7.0', 'brunsli=0.1', 'bzip2=1.0.8', 'c-ares=1.18.1', 'c-blosc2=2.0.4', 'ca-certificates=2022.2.1', 'cached-property=1.5.2', 'cached_property=1.5.2', 'cachetools=4.2.4', 'certifi=2021.10.8', 'cffi=1.15.0', 'cfitsio=4.0.0', 'cftime=1.6.0', 'charls=2.3.4', 'charset-normalizer=2.0.12', 'click=8.0.4', 'cloudpickle=2.0.0', 'cryptography=36.0.1', 'curl=7.82.0', 'cycler=0.11.0', 'cytoolz=0.11.2', 'dask=2022.2.1', 'dask-core=2022.2.1', 'dbus=1.13.6', 'debugpy=1.5.1', 'decorator=5.1.1', 'defusedxml=0.7.1', 'distributed=2022.2.1', 'entrypoints=0.4', 'executing=0.8.3', 'exifread=2.3.2', 'expat=2.4.7', 'fasteners=0.17.3', 'flit-core=3.7.1', 'fonttools=4.30.0', 'freetype=2.10.4', 'frozenlist=1.3.0', 'fsspec=2022.2.0', 'gast=0.4.0', 'gettext=0.19.8.1', 'giflib=5.2.1', 'google-auth=1.35.0', 'google-auth-oauthlib=0.4.6', 'google-pasta=0.2.0', 'grpc-cpp=1.42.0', 'grpcio=1.42.0', 'h5py=3.6.0', 'hdf4=4.2.15', 'hdf5=1.12.1', 'heapdict=1.0.1', 'icu=69.1', 'idna=3.3', 'imagecodecs=2022.2.22', 'imageio=2.16.1', 'importlib-metadata=4.11.3', 'importlib_metadata=4.11.3', 'importlib_resources=5.4.0', 'intake=0.6.5', 'ipykernel=6.9.1', 'ipython=8.1.1', 'ipython_genutils=0.2.0', 'ipywidgets=7.6.5', 'jbig=2.1', 'jedi=0.18.1', 'jinja2=3.0.3', 'jpeg=9e', 'jsonschema=4.4.0', 'jupyter=1.0.0', 'jupyter_client=7.1.2', 'jupyter_console=6.4.3', 'jupyter_core=4.9.2', 'jupyterlab_pygments=0.1.2', 'jupyterlab_widgets=1.0.2', 'jxrlib=1.1', 'keras=2.7.0', 'keras-preprocessing=1.1.2', 'kiwisolver=1.4.0', 'krb5=1.19.3', 'lcms2=2.12', 'lerc=3.0', 'libaec=1.0.6', 'libavif=0.9.3', 'libblas=3.9.0', 'libbrotlicommon=1.0.9', 'libbrotlidec=1.0.9', 'libbrotlienc=1.0.9', 'libcblas=3.9.0', 'libclang=13.0.1', 'libcurl=7.82.0', 'libcxx=13.0.1', 'libdeflate=1.10', 'libedit=3.1.20191231', 'libev=4.33', 'libffi=3.4.2', 'libglib=2.70.2', 'libiconv=1.16', 'liblapack=3.9.0', 'libllvm13=13.0.1', 'libnetcdf=4.8.1', 'libnghttp2=1.47.0', 'libopenblas=0.3.18', 'libpng=1.6.37', 'libpq=14.2', 'libprotobuf=3.19.4', 'libsodium=1.0.18', 'libssh2=1.10.0', 'libtiff=4.3.0', 'libwebp=1.2.2', 'libwebp-base=1.2.2', 'libxcb=1.13', 'libzip=1.8.0', 'libzlib=1.2.11', 'libzopfli=1.0.3', 'llvm-openmp=13.0.1', 'locket=0.2.0', 'lz4-c=1.9.3', 'markdown=3.3.6', 'markupsafe=2.1.1', 'matplotlib=3.5.1', 'matplotlib-base=3.5.1', 'matplotlib-inline=0.1.3', 'mistune=0.8.4', 'msgpack-python=1.0.3', 'multidict=6.0.2', 'munkres=1.1.4', 'mysql-common=8.0.28', 'mysql-libs=8.0.28', 'nbclient=0.5.13', 'nbconvert=6.4.4', 'nbformat=5.2.0', 'ncurses=6.3', 'nest-asyncio=1.5.4', 'netcdf4=1.5.8', 'networkx=2.7.1', 'notebook=6.4.10', 'nspr=4.32', 'nss=3.74', 'numcodecs=0.9.1', 'numpy=1.22.3', 'oauthlib=3.2.0', 'openjpeg=2.4.0', 'openssl=1.1.1m', 'opt_einsum=3.3.0', 'packaging=21.3', 'pandas=1.4.1', 'pandoc=2.17.1.1', 'pandocfilters=1.5.0', 'parso=0.8.3', 'partd=1.2.0', 'pcre=8.45', 'pexpect=4.8.0', 'pickleshare=0.7.5', 'pillow=9.0.1', 'pip=22.0.4', 'prometheus_client=0.13.1', 'prompt-toolkit=3.0.27', 'prompt_toolkit=3.0.27', 'protobuf=3.19.4', 'psutil=5.9.0', 'pthread-stubs=0.4', 'ptyprocess=0.7.0', 'pure_eval=0.2.2', 'pyasn1=0.4.8', 'pyasn1-modules=0.2.7', 'pycparser=2.21', 'pygments=2.11.2', 'pyjwt=2.3.0', 'pyopenssl=22.0.0', 'pyparsing=3.0.7', 'pyqt=5.12.3', 'pyqt-impl=5.12.3', 'pyqt5-sip=4.19.18', 'pyqtchart=5.12', 'pyqtwebengine=5.12.1', 'pyrsistent=0.18.1', 'pysocks=1.7.1', 'python=3.9.10', 'python-dateutil=2.8.2', 'python-flatbuffers=2.0', 'python_abi=3.9', 'pytz=2021.3', 'pyu2f=0.1.5', 'pywavelets=1.3.0', 'pyyaml=6.0', 'pyzmq=22.3.0', 'qt=5.12.9', 'qtconsole=5.2.2', 'qtconsole-base=5.2.2', 'qtpy=2.0.1', 're2=2021.11.01', 'readline=8.1', 'requests=2.27.1', 'requests-oauthlib=1.3.1', 'rsa=4.8', 'scikit-image=0.19.2', 'scipy=1.8.0', 'send2trash=1.8.0', 'setuptools=59.8.0', 'six=1.16.0', 'snappy=1.1.8', 'sortedcontainers=2.4.0', 'soupsieve=2.3.1', 'sqlite=3.37.1', 'stack_data=0.2.0', 'tblib=1.7.0', 'tensorboard=2.6.0', 'tensorboard-data-server=0.6.0', 'tensorboard-plugin-wit=1.8.1', 'tensorflow=2.7.0', 'tensorflow-base=2.7.0', 'tensorflow-estimator=2.7.0', 'termcolor=1.1.0', 'terminado=0.13.3', 'testpath=0.6.0', 'tifffile=2022.2.9', 'tk=8.6.12', 'toolz=0.11.2', 'tornado=6.1', 'traitlets=5.1.1', 'typing-extensions=4.1.1', 'typing_extensions=4.1.1', 'tzdata=2021e', 'unicodedata2=14.0.0', 'urllib3=1.26.8', 'wcwidth=0.2.5', 'webencodings=0.5.1', 'werkzeug=2.0.3', 'wheel=0.37.1', 'widgetsnbextension=3.5.2', 'wrapt=1.14.0', 'xarray=2022.3.0', 'xorg-libxau=1.0.9', 'xorg-libxdmcp=1.1.3', 'xz=5.2.5', 'yaml=0.2.5', 'yarl=1.7.2', 'zarr=2.11.1', 'zeromq=4.3.4', 'zfp=0.5.5', 'zict=2.1.0', 'zipp=3.7.0', 'zlib=1.2.11', 'zstd=1.5.2']
Encountered problems while solving:
  - package nbconvert-6.4.4-py310hff52083_0 requires python_abi 3.10.* *_cp310, but none of the providers can be installed

pkgs/main/noarch          
pkgs/r/linux-64           
pkgs/r/noarch             
pkgs/main/linux-64        
conda-forge/noarch        
conda-forge/linux-64      
time: 27.907
Removing intermediate container 8eaa9a6d1b0a
The command '/bin/sh -c TIMEFORMAT='time: %3R' bash -c 'time ${MAMBA_EXE} env update -p ${NB_PYTHON_PREFIX} --file "environment.yml" && time ${MAMBA_EXE} clean --all -f -y && ${MAMBA_EXE} list -p ${NB_PYTHON_PREFIX} '' returned a non-zero code: 1Built image, launching...
Failed to connect to event stream

Environment fails to build

When running conda env create -f environment.yml, the environment fails to build due to conflicts. This is running on macOS Ventura 13.1 (22C65).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.