• Stars
    star
    107
  • Rank 323,587 (Top 7 %)
  • Language
    Jupyter Notebook
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Img2Mol: inferring molecules from pictures

Img2Mol Welcome to Img2Mol! πŸ‘‹.

πŸ‘‰ For the Img2Mol web app switch to the "deployment-example" branch.

Overview

Here we provide the implementation of the img2mol model using PyTorch and PyTorch Lightning for training and inference, along with an exemplary jupyter notebook.

This repository is organized as follows:

  • examples/: contains example images to apply our proposed model on
  • img2mol/: contains necessary python modules for our proposed model
  • model/: stores the trained model weights as pickled files. The download-link will be provided in future soon

Installation

Requirements

python=3.8.5
pip=20.2.4
notebook=6.4.2
pillow=8.0.1
numpy=1.19.2
rdkit=2020.03.1
cudatoolkit=11.0
torchvision=0.8.0
torchaudio=0.7.0
pytorch=1.7.0
pytorch-lightning=1.0.8

Environment

Create a new environment:

git clone [email protected]:bayer-science-for-a-better-life/Img2Mol.git
cd Img2Mol
conda env create -f environment.yml
conda activate img2mol
pip install .

If you want to run Img2Mol as a standalone version with a locally loaded CDDD model instead of sending requests to our CDDD server, install the environment from environment.local-cddd.yml instead of environment.yml

Download Model Weights

You can download the trained parameters for the default model (~2.4GB) as described in our paper using the following link: https://drive.google.com/file/d/1pk21r4Zzb9ZJkszJwP9SObTlfTaRMMtF/view .
Please move the downloaded file model.ckpt into the model/ directory.

If you are working with the local CDDD installation, please * download and unzip the CDDD model and ove the directory default_model to path/to/anaconda3/envs/img2mol/lib/python3.6/site-packages/cddd/data/

Alternatively, we provide a bash script that will download and move the file automatically.

bash download_model.sh

If you have problems downloading the file using the bash script, please manually download the file using the browser.

Examples

Check the example notebook example_inference.ipynb to see how the inference class can be used. A demonstration of the usage with the usage with the local CDDD model is demonstrated in example_inference_local_cddd.ipynb.

Reference

Please cite our manuscript if you use our model in your work.

D.-A. Clevert, T. Le, R. Winter, F. Montanari, Chem. Sci., 2021, DOI: 10.1039/D1SC01839F

Img2Mol Code License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Model Parameters License

The Img2Mol parameters are made available for non-commercial use only, under the terms of the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license. You can find details at: https://creativecommons.org/licenses/by-nc/4.0/legalcode

More Repositories

1

phc-gnn

Implementation of the Paper: "Parameterized Hypercomplex Graph Neural Networks for Graph Classification" by Tuan Le, Marco Bertolini, Frank NoΓ© and Djork-ArnΓ© Clevert
Python
31
star
2

data2text-bioleaflets

Biomedical Data-to-Text Generation via Fine-Tuning Transformers
Python
29
star
3

pKAI

pKAI: a fast and interpretable deep learning approach to accurate electrostatics-driven pKa prediction
Python
24
star
4

neuraldecipher

Implementation of the paper "Neuraldecipher - Reverse-engineering extended-connectivity fingerprints (ECFPs) to their molecular structures" by Tuan Le, Robin Winter, Frank NoΓ© and Djork-ArnΓ© Clevert
Python
24
star
5

topefind-public

Finding the pitfalls of deep learning predictors of interacting residues in antibodies 🦠
Python
22
star
6

contrastive-reconstruction

Tensorflow-keras implementation for Contrastive Reconstruction (ConRec) : a self-supervised learning algorithm that obtains image representations by jointly optimizing a contrastive and a self-reconstruction loss.
Python
16
star
7

abfe-benchmark

Jupyter Notebook
9
star
8

pege

Protein Environment Graph Embeddings
Python
7
star
9

abbert-cerebras

Python
6
star
10

plant-triplet-net

Python
4
star
11

molnet-geometric-lightning

MoleculeNet Benchmarks in Pytorch Lightning with Torch Geometirc
Jupyter Notebook
4
star
12

mtnngc_admet

Python
3
star
13

grami-example

Example project showing how to use GraMi
Java
3
star
14

hbond-benchmark

Adding H-donor-acceptor bonds to GNNs
Jupyter Notebook
3
star
15

mlr-challenges-frankenbody

Bayer's MLR antibody data modelling challenge
Python
3
star
16

eh-benchmark

Boosting GNN performance with lightweight QM features
Python
2
star
17

beehive

Side project for helping beekeepers. Segment and classify honeycomb pictures to find out how many larvae, eggs, nectar, etc are in the brood.
Python
1
star
18

XAI4Embeddings

Python
1
star
19

openslide-python-feedstock

A conda-smithy repository for openslide-python.
Shell
1
star