Neural Message Passing for Computer Vision

Related tags

Deep Learning nmp_qc
Overview

Neural Message Passing for Quantum Chemistry

Implementation of different models of Neural Networks on graphs as explained in the article proposed by Gilmer et al. [1].

Installation

$ pip install -r requirements.txt
$ python main.py

Installation of rdkit

Running any experiment using QM9 dataset needs installing the rdkit package, which can be done following the instructions available here

Data

The data used in this project can be downloaded here.

Bibliography

Cite

@Article{Gilmer2017,
  author  = {Justin Gilmer and Samuel S. Schoenholz and Patrick F. Riley and Oriol Vinyals and George E. Dahl},
  title   = {Neural Message Passing for Quantum Chemistry},
  journal = {CoRR},
  year    = {2017}
}

Authors

Comments
  • boost::mutex::~mutex(): Assertion `!res' failed.

    boost::mutex::~mutex(): Assertion `!res' failed.

    Hi, I am trying to run the program on Ubuntu 16.04 with python 2.7. I have the rdkit package installed and the data downloaded. However, when I tried to run the main program I got the following error:

    (venv) siyuan:nmp_qc$ python main.py 
    Prepare files
    Define model
    python: /usr/include/boost/thread/pthread/mutex.hpp:111: boost::mutex::~mutex(): Assertion `!res' failed.
    Aborted (core dumped)
    

    The program crashed here: https://github.com/priba/nmp_qc/blob/177db7ea738a7a91f1262ce954f9c7a4a2b98849/main.py#L101-L103

    What would possibly be the reason for that? Thanks in advance!

    opened by SiyuanQi-zz 4
  • 'Graph' object has no attribute 'nodes_iter' Error

    'Graph' object has no attribute 'nodes_iter' Error

    When I followed the installation that installed rdkit and all other requirements, and downloaded the data, run the "python main.py", I got the error below. Does there something error in the code?

    Prepare files
    Define model
    Traceback (most recent call last):
      File "/home/ay27/repo/nmp_qc/main.py", line 320, in <module>
        main()
      File "/home/ay27/repo/nmp_qc/main.py", line 103, in main
        g_tuple, l = data_train[0]
      File "/home/ay27/repo/nmp_qc/datasets/qm9.py", line 47, in __getitem__
        h = self.vertex_transform(g)
      File "/home/ay27/repo/nmp_qc/datasets/utils.py", line 28, in qm9_nodes
        for n, d in g.nodes_iter(data=True):
    AttributeError: 'Graph' object has no attribute 'nodes_iter'
    
    opened by ay27 3
  • Readout function in mpnn and mpnn_ggcn

    Readout function in mpnn and mpnn_ggcn

    In the original paper, the readout function is different between ggcn and the function used in the paper. But I noticed that you implement them as the same function. Have I missed something?

    opened by zeal-github 1
  • Solve Issue #3 & #4

    Solve Issue #3 & #4

    I have made some changes and try to fix #3 #4 . The improvement includes:

    1. fix requirements
    2. make compatible with pytorch 0.3.0

    Finally, I got a descending loss and Error Ratio, but I'm not confident whether the fixes match the original logic. Someone may verify it.

    opened by ay27 1
  • RuntimeError during default execution

    RuntimeError during default execution

    Hello, thank you for your implemenation!

    I've just tried to run default experiment with

    python main.py --no-cuda --epochs 1

    and run into the following problem

    /opt/conda/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6 return f(*args, **kwds)
    Prepare files
    Define model
            Statistics
            Create model
    Optimizer
    Logger
    => no best model found at './checkpoint/qm9/mpnn/model_best.pth'
    Check cuda
    Traceback (most recent call last):
      File "main.py", line 321, in <module>
        main()
      File "main.py", line 182, in main
        train(train_loader, model, criterion, optimizer, epoch, evaluation, logger)
      File "main.py", line 242, in train
        output = model(g, h, e)
      File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 319, in __call__
        result = self.forward(*input, **kwargs)
      File "/data/grishin/nmp_qc/models/MPNN.py", line 78, in forward
        m = self.m[0].forward(h[t], h_aux, e_aux)
      File "/data/grishin/nmp_qc/MessageFunction.py", line 43, in forward
        return self.m_function(h_v, h_w, e_vw, args)
      File "/data/grishin/nmp_qc/MessageFunction.py", line 175, in m_mpnn
        h_w_rows = h_w[..., None].expand(h_w.size(0), h_v.size(1), h_w.size(1)).contiguous()
    RuntimeError: The expanded size of the tensor (25) must match the existing size (73) at non-singleton dimension 1
    

    Am i doing something wrong? Thank you in advance.

    opened by AlexanderGri 11
Owner
Pau Riba
Postdoctoral Researcher at Computer Vision Center
Pau Riba
A PyTorch implementation of "Pathfinder Discovery Networks for Neural Message Passing"

A PyTorch implementation of "Pathfinder Discovery Networks for Neural Message Passing" (WebConf 2021). Abstract In this work we propose Pathfind

Benedek Rozemberczki 49 Dec 1, 2022
Official implementation of Rethinking Graph Neural Architecture Search from Message-passing (CVPR2021)

Rethinking Graph Neural Architecture Search from Message-passing Intro The GNAS can automatically learn better architecture with the optimal depth of

Shaofei Cai 48 Sep 30, 2022
BRepNet: A topological message passing system for solid models

BRepNet: A topological message passing system for solid models This repository contains the an implementation of BRepNet: A topological message passin

Autodesk AI Lab 42 Dec 30, 2022
Message Passing on Cell Complexes

CW Networks This repository contains the code used for the papers Weisfeiler and Lehman Go Cellular: CW Networks (Under review) and Weisfeiler and Leh

Twitter Research 108 Jan 5, 2023
This project demonstrates the use of neural networks and computer vision to create a classifier that interprets the Brazilian Sign Language.

LIBRAS-Image-Classifier This project demonstrates the use of neural networks and computer vision to create a classifier that interprets the Brazilian

Aryclenio Xavier Barros 26 Oct 14, 2022
QTool: A Low-bit Quantization Toolbox for Deep Neural Networks in Computer Vision

This project provides abundant choices of quantization strategies (such as the quantization algorithms, training schedules and empirical tricks) for quantizing the deep neural networks into low-bit counterparts.

Monash Green AI Lab 51 Dec 10, 2022
LeafSnap replicated using deep neural networks to test accuracy compared to traditional computer vision methods.

Deep-Leafsnap Convolutional Neural Networks have become largely popular in image tasks such as image classification recently largely due to to Krizhev

Sujith Vishwajith 48 Nov 27, 2022
Lacmus is a cross-platform application that helps to find people who are lost in the forest using computer vision and neural networks.

lacmus The program for searching through photos from the air of lost people in the forest using Retina Net neural nwtwork. The project is being develo

Lacmus Foundation 168 Dec 27, 2022
Spiking Neural Network for Computer Vision using SpikingJelly framework and Pytorch-Lightning

Spiking Neural Network for Computer Vision using SpikingJelly framework and Pytorch-Lightning

Sami BARCHID 2 Oct 20, 2022
Neural Turing Machine (NTM) & Differentiable Neural Computer (DNC) with pytorch & visdom

Neural Turing Machine (NTM) & Differentiable Neural Computer (DNC) with pytorch & visdom Sample on-line plotting while training(avg loss)/testing(writ

Jingwei Zhang 269 Nov 15, 2022
Open source Python module for computer vision

About PCV PCV is a pure Python library for computer vision based on the book "Programming Computer Vision with Python" by Jan Erik Solem. More details

Jan Erik Solem 1.9k Jan 6, 2023
PyTorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision.

PyTorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision @misc{CV2018, author = {Donny You ([email protected])}, howpubl

Donny You 40 Sep 14, 2022
Build fully-functioning computer vision models with PyTorch

Detecto is a Python package that allows you to build fully-functioning computer vision and object detection models with just 5 lines of code. Inferenc

Alan Bi 576 Dec 29, 2022
Implementation of self-attention mechanisms for general purpose. Focused on computer vision modules. Ongoing repository.

Self-attention building blocks for computer vision applications in PyTorch Implementation of self attention mechanisms for computer vision in PyTorch

AI Summer 962 Dec 23, 2022
Datasets, Transforms and Models specific to Computer Vision

torchvision The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision. Installat

null 13.1k Jan 2, 2023
Repository providing a wide range of self-supervised pretrained models for computer vision tasks.

Hierarchical Pretraining: Research Repository This is a research repository for reproducing the results from the project "Self-supervised pretraining

Colorado Reed 53 Nov 9, 2022
A PyTorch-Based Framework for Deep Learning in Computer Vision

TorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision @misc{you2019torchcv, author = {Ansheng You and Xiangtai Li and Zhen Zhu a

Donny You 2.2k Jan 9, 2023
Open Source Differentiable Computer Vision Library for PyTorch

Kornia is a differentiable computer vision library for PyTorch. It consists of a set of routines and differentiable modules to solve generic computer

kornia 7.6k Jan 4, 2023
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition

Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition

null 107 Dec 2, 2022