Learning to Compare: Relation Network for Few-Shot Learning

Pytorch Implementation for Paper: Learning to Compare: Relation Network for Few-Shot Learning download mini-imagenet and make it looks like: mini-imagenet/ ├── images ├── n0210891500001298.jpg ├── n0287152500001298.jpg … ├── test.csv ├── val.csv └── train.csv LearningToCompare-Pytorch/ ├── compare.py ├── MiniImagenet.py ├── Readme.md ├── repnet.py ├── train.py └── utils.py python train.py current code support multi-gpus on single machine training, to disable it and train on single machine,just set device_ids=[0] and downsize batch size according to your gpu memory capacity.make sure ckpt directory exists, […]

Read more

Poincaré Embeddings for Learning Hierarchical Representations

Poincaré Embeddings for Learning Hierarchical Representations PyTorch implementation of Poincaré Embeddings for Learning Hierarchical Representations Installation Simply clone this repository via git clone https://github.com/facebookresearch/poincare-embeddings.git cd poincare-embeddings conda env create -f environment.yml source activate poincare python setup.py build_ext –inplace Example: Embedding WordNet Mammals To embed the transitive closure of the WordNet mammals subtree, first generate the data via cd wordnet python transitive_closure.py This will generate the transitive closure of the full noun hierarchy as well as of the mammals subtree of […]

Read more

A PyTorch Implementation of Gated Graph Sequence Neural Networks

A PyTorch Implementation of GGNN This is a PyTorch implementation of the Gated Graph Sequence Neural Networks (GGNN) as described in the paper Gated Graph Sequence Neural Networks by Y. Li, D. Tarlow, M. Brockschmidt, and R. Zemel. This implementation gets 100% accuracy on node-selection bAbI task 4, 15, and 16. Their official implementation are available in the yujiali/ggnn repo on GitHub. What is GGNN? Solve graph-structured data and problems A gated propagation model to compute node representations Unroll recurrence […]

Read more

An implementation of Deepmind visual interaction networks in Pytorch

Visual-Interaction-Networks An implementation of Deepmind visual interaction networks in Pytorch. For the purpose of understanding the challenge of relational reasoning. they publised VIN that involves predicting the future in a physical scene. From just a glance, humans can infer not only what objects are where, but also what will happen to them over the upcoming seconds, minutes and even longer in some cases. For example, if you kick a football against a wall, your brain predicts what will happen when […]

Read more

An implementation of the Adversarial Patch paper

adversarial-patch PyTorch implementation of adversarial patch This is an implementation of the Adversarial Patch paper. Not official and likely to have bugs/errors. How to run: Data set-up: Run attack: python make_patch.py –cuda –netClassifier inceptionv3 –max_count 500 –image_size 299 –patch_type circle –outf log Results: Using patch shapes of both circles and squares gave good results (both achieved 100% success on the training set and eventually > 90% success on test set) I managed to recreate the toaster example in the original […]

Read more

Photographic Image Synthesis with Cascaded Refinement Networks-Pytorch

Photographic Image Synthesis with Cascaded Refinement Networks-Pytorch This is a Pytorch implementation of cascaded refinement networks to synthesize photographic images from semantic layouts. Now the pretrained model and codes for training the network from scratch are available for 256×512 resolution. Thanks to Qifeng Chen for his tensorflow implementation which helped a lot in developing this pytorch version. Testing Download this package and keep all the subsequent mentioned files in the same folder. Download the pretrained VGG19 Net from VGG19 Download […]

Read more

Efficient Neural Architecture Search (ENAS) in PyTorch

PyTorch implementation of Efficient Neural Architecture Search via Parameters Sharing. ENAS reduce the computational requirement (GPU-hours) of Neural Architecture Search (NAS) by 1000x via parameter sharing between models that are subgraphs within a large computational graph. SOTA on Penn Treebank language modeling. Prerequisites Python 3.6+ PyTorch==0.3.1 tqdm, scipy, imageio, graphviz, tensorboardX Usage Install prerequisites with: conda install graphviz pip install -r requirements.txt To train ENAS to discover a recurrent cell for RNN: python main.py –network_type rnn –dataset ptb –controller_optim adam […]

Read more

A PyTorch Implementation of Neural IMage Assessment

NIMA: Neural IMage Assessment This is a PyTorch implementation of the paper NIMA: Neural IMage Assessment (accepted at IEEE Transactions on Image Processing) by Hossein Talebi and Peyman Milanfar. You can learn more from this post at Google Research Blog. Implementation Details The model was trained on the AVA (Aesthetic Visual Analysis) dataset containing 255,500+ images. You can get it from here. Note: there may be some corrupted images in the dataset, remove them first before you start training. Use […]

Read more

Given a content photo and a style photo with python

FastPhotoStyle Given a content photo and a style photo, the code can transfer the style of the style photo to the content photo. The details of the algorithm behind the code is documented in our arxiv paper. Please cite the paper if this code repository is used in your publications. GitHub https://github.com/NVIDIA/FastPhotoStyle    

Read more

A python implementation of Deep-Image-Analogy based on pytorch

Deep-Image-Analogy This project is a python implementation of Deep Image Analogy. Some results Requirements python 3 opencv3 If you use anaconda, you can install opencv3 by conda install opencv pytorch See pytorch for installation Codes in branch “master” works with pytorch 0.4 Codes in branch “pytorch0.3” works with pytorch 0.3 cuda (CPU version is not implemented yet) Usage (demo) python main.py –resize_ratio 0.5 –weight 2 –img_A_path data/demo/ava.png –img_BP_path data/demo/mona.png –use_cuda True GitHub https://github.com/Ben-Louis/Deep-Image-Analogy-PyTorch    

Read more
1 568 569 570 571 572 972