TilinGNN: Learning to Tile with Self-Supervised Graph Neural Network (SIGGRAPH 2020)

Overview

TilinGNN: Learning to Tile with Self-Supervised Graph Neural Network (SIGGRAPH 2020)

Teaser Figure

About

The goal of our research problem is illustrated below: given a tile set (a) and a 2D region to be filled (b), we aim to produce a tiling (c) that maximally covers the interior of the given region without overlap or hole between the tile instances.

Dependencies:

This project is implemented in Python 3.7. You need to install the following packages to run our program.

  • Pytorch (tested with v1.2.0): compulsory, to manipulate the tensors on GUP, and to build up the networks.
  • Pytorch Geometric (tested with v1.3.2): compulsory, to build up the graph networks.
  • Numpy: compulsory, to manipulate the arrays and their computations.
  • Shapely (tested with v1.6.4): compulsory, for geometric computations such as collision detection.
  • PyQT5: compulsory, for rendering results, and display UI interface.
  • Minizinc: optional, install it only when you use IP solvers

Usage

We provide the following entry points for researchers to try our project:

  • Tiling Design by UI interface: From file Tiling-GUI.py, you can use our interface to draw a tiling region and preview the tiling results interactively.
  • Tiling a region of silhouette image: From file Tiling-Shape.py, you can use our pre-trained models, or IP solver, to solve a tiling problem by specifying a tiling region (from silhouette image) and a tile set.
  • Training for new tile Sets: You need the following steps to train a network for a new tile set.
    1. Following the file organization of existing tile sets inside the data folder, create a new folder with new files that describe your new tile sets. After that, you need to edit the global configuration file inputs/config.py to let the system know you your new tile set.
    2. Create a superset of candidate tile placements by running file tiling/gen_complete_super_graph.py, the generated files will be stored in the folder you created in Step (1).
    3. Generate training data of random shapes by running solver/ml_solver/gen_data.py, the data will be stored in the path recorded in file inputs/config.py.
    4. Start network training by running file solver/ml_solver/network_train.py.

Note

In this program, we have a global configuration file inputs/config.py, which plays a very important role to control the behavior of the programs, such as which tile set you want to work with, the stored location of the trained networks, or how many training data you will create, etc.

Keep Improving

If you met problems or any question on this project, contact us at [[email protected]] or [[email protected]]

You might also like...
A PyTorch implementation of
A PyTorch implementation of "Multi-Scale Contrastive Siamese Networks for Self-Supervised Graph Representation Learning", IJCAI-21

MERIT A PyTorch implementation of our IJCAI-21 paper Multi-Scale Contrastive Siamese Networks for Self-Supervised Graph Representation Learning. Depen

Official implementation of "Motif-based Graph Self-Supervised Learning forMolecular Property Prediction"

Motif-based Graph Self-Supervised Learning for Molecular Property Prediction Official Pytorch implementation of NeurIPS'21 paper "Motif-based Graph Se

An official PyTorch implementation of the TKDE paper "Self-Supervised Graph Representation Learning via Topology Transformations".

Self-Supervised Graph Representation Learning via Topology Transformations This repository is the official PyTorch implementation of the following pap

Graph Self-Supervised Learning for Optoelectronic Properties of Organic Semiconductors
Graph Self-Supervised Learning for Optoelectronic Properties of Organic Semiconductors

SSL_OSC Graph Self-Supervised Learning for Optoelectronic Properties of Organic Semiconductors

PyTorch implementations for our SIGGRAPH 2021 paper: Editable Free-viewpoint Video Using a Layered Neural Representation.
PyTorch implementations for our SIGGRAPH 2021 paper: Editable Free-viewpoint Video Using a Layered Neural Representation.

st-nerf We provide PyTorch implementations for our paper: Editable Free-viewpoint Video Using a Layered Neural Representation SIGGRAPH 2021 Jiakai Zha

ManipNet: Neural Manipulation Synthesis with a Hand-Object Spatial Representation - SIGGRAPH 2021
ManipNet: Neural Manipulation Synthesis with a Hand-Object Spatial Representation - SIGGRAPH 2021

ManipNet: Neural Manipulation Synthesis with a Hand-Object Spatial Representation - SIGGRAPH 2021 Dataset Code Demos Authors: He Zhang, Yuting Ye, Tak

This is an open-source toolkit for Heterogeneous Graph Neural Network(OpenHGNN) based on DGL [Deep Graph Library] and PyTorch.

This is an open-source toolkit for Heterogeneous Graph Neural Network(OpenHGNN) based on DGL [Deep Graph Library] and PyTorch.

This is the repository for the AAAI 21 paper [Contrastive and Generative Graph Convolutional Networks for Graph-based Semi-Supervised Learning].

CG3 This is the repository for the AAAI 21 paper [Contrastive and Generative Graph Convolutional Networks for Graph-based Semi-Supervised Learning]. R

[CVPR 2021]
[CVPR 2021] "The Lottery Tickets Hypothesis for Supervised and Self-supervised Pre-training in Computer Vision Models" Tianlong Chen, Jonathan Frankle, Shiyu Chang, Sijia Liu, Yang Zhang, Michael Carbin, Zhangyang Wang

The Lottery Tickets Hypothesis for Supervised and Self-supervised Pre-training in Computer Vision Models Codes for this paper The Lottery Tickets Hypo

Comments
  • AttributeError: 'NNConv' object has no attribute '__user_args__'

    AttributeError: 'NNConv' object has no attribute '__user_args__'

    Error with pytorch1.5.0, cuda10.2 in Ubuntu20

    1. error reported from "Tiling-Shape.py"

    File "./Tiling-Shape.py", line 86, in tiling_a_region() File "./Tiling-Shape.py", line 59, in tiling_a_region result_brick_layout, score = solver.solve(result_brick_layout) File "/home/Desktop/clone/TilinGNN/solver/ml_solver/ml_solver.py", line 60, in solve output_solution, score, predict_order = algorithms.solve_by_probablistic_greedy(self, brick_layout) File "/home/Desktop/clone/TilinGNN/util/algorithms.py", line 31, in solve_by_probablistic_greedy prob = ml_solver.predict(temp_layout) File "/home/Desktop/clone/TilinGNN/solver/ml_solver/ml_solver.py", line 43, in predict col_e_features=collide_edge_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, **kwargs) File "/home/Desktop/clone/TilinGNN/graph_networks/networks/TilinGNN.py", line 62, in forward brch_1_feature, *_ = conv_layer(brch_1_feature, adj_e_index, adj_e_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, **kwargs) File "/home/Desktop/clone/TilinGNN/graph_networks/layers/edge_conv.py", line 25, in forward x = self.nnConv(x, edge_index, edge_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, **kwargs) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/nn_conv.py", line 81, in forward return self.propagate(edge_index, x=x, pseudo=pseudo) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 250, in propagate kwargs = self.collect(edge_index, size, mp_type, kwargs) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 124, in collect for arg in self.user_args: File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 594, in getattr type(self).name, name)) AttributeError: 'NNConv' object has no attribute 'user_args'

    1. error reported from "Tiling-GUI.py" when press 'S' to solve

    Traceback (most recent call last): File "./Tiling-GUI.py", line 133, in keyPressEvent self.current_solution_layout = self.solve_Brick_Layout(self.current_brick_layout) File "./Tiling-GUI.py", line 489, in solve_Brick_Layout result_brick_layout, score = self.solver.solve(brick_layout) File "/home/Desktop/clone/TilinGNN/solver/ml_solver/ml_solver.py", line 60, in solve output_solution, score, predict_order = algorithms.solve_by_probablistic_greedy(self, brick_layout) File "/home/Desktop/clone/TilinGNN/util/algorithms.py", line 31, in solve_by_probablistic_greedy prob = ml_solver.predict(temp_layout) File "/home/Desktop/clone/TilinGNN/solver/ml_solver/ml_solver.py", line 43, in predict col_e_features=collide_edge_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, **kwargs) File "/home/Desktop/clone/TilinGNN/graph_networks/networks/TilinGNN.py", line 62, in forward brch_1_feature, *_ = conv_layer(brch_1_feature, adj_e_index, adj_e_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, **kwargs) File "/home/Desktop/clone/TilinGNN/graph_networks/layers/edge_conv.py", line 25, in forward x = self.nnConv(x, edge_index, edge_features) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, **kwargs) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/nn_conv.py", line 81, in forward return self.propagate(edge_index, x=x, pseudo=pseudo) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 250, in propagate kwargs = self.collect(edge_index, size, mp_type, kwargs) File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 124, in collect for arg in self.user_args: File "/home/.conda/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 594, in getattr type(self).name, name)) AttributeError: 'NNConv' object has no attribute 'user_args'

    opened by Chaunceyw001 5
Owner
PhD, The Chinese University of Hong Kong.
null
Apply Graph Self-Supervised Learning methods to graph-level task(TUDataset, MolculeNet Datset)

Graphlevel-SSL Overview Apply Graph Self-Supervised Learning methods to graph-level task(TUDataset, MolculeNet Dataset). It is unified framework to co

JunSeok 8 Oct 15, 2021
Face Identity Disentanglement via Latent Space Mapping [SIGGRAPH ASIA 2020]

Face Identity Disentanglement via Latent Space Mapping Description Official Implementation of the paper Face Identity Disentanglement via Latent Space

null 150 Dec 7, 2022
A code repository associated with the paper A Benchmark for Rough Sketch Cleanup by Chuan Yan, David Vanderhaeghe, and Yotam Gingold from SIGGRAPH Asia 2020.

A Benchmark for Rough Sketch Cleanup This is the code repository associated with the paper A Benchmark for Rough Sketch Cleanup by Chuan Yan, David Va

null 33 Dec 18, 2022
Implementation for "Manga Filling Style Conversion with Screentone Variational Autoencoder" (SIGGRAPH ASIA 2020 issue)

Manga Filling with ScreenVAE SIGGRAPH ASIA 2020 | Project Website | BibTex This repository is for ScreenVAE introduced in the following paper "Manga F

null 30 Dec 24, 2022
Unified Pre-training for Self-Supervised Learning and Supervised Learning for ASR

UniSpeech The family of UniSpeech: UniSpeech (ICML 2021): Unified Pre-training for Self-Supervised Learning and Supervised Learning for ASR UniSpeech-

Microsoft 282 Jan 9, 2023
Self-supervised learning on Graph Representation Learning (node-level task)

graph_SSL Self-supervised learning on Graph Representation Learning (node-level task) How to run the code To run GRACE, sh run_GRACE.sh To run GCA, sh

Namkyeong Lee 3 Dec 31, 2021
Self-Supervised Monocular 3D Face Reconstruction by Occlusion-Aware Multi-view Geometry Consistency[ECCV 2020]

Self-Supervised Monocular 3D Face Reconstruction by Occlusion-Aware Multi-view Geometry Consistency(ECCV 2020) This is an official python implementati

null 304 Jan 3, 2023
Official PyTorch implementation for paper Context Matters: Graph-based Self-supervised Representation Learning for Medical Images

Context Matters: Graph-based Self-supervised Representation Learning for Medical Images Official PyTorch implementation for paper Context Matters: Gra

null 49 Nov 23, 2022
Tensorflow implementation for Self-supervised Graph Learning for Recommendation

If the compilation is successful, the evaluator of cpp implementation will be called automatically. Otherwise, the evaluator of python implementation will be called.

null 152 Jan 7, 2023
Implementation of Self-supervised Graph-level Representation Learning with Local and Global Structure (ICML 2021).

Self-supervised Graph-level Representation Learning with Local and Global Structure Introduction This project is an implementation of ``Self-supervise

MilaGraph 50 Dec 9, 2022