Skip to content

Self supervised feature extraction trained on a single image

Notifications You must be signed in to change notification settings

Bartolo1024/Pixel2Vec

Repository files navigation

Pixel2Vec

A self-supervised feature extraction trained on the single image.

An example use in a preprint:

Installation

The preferred way to install is to use a conda environment.

git clone git@github.com:Bartolo1024/Pixel2Vec.git
cd Pixel2Vec
conda env create -f .\environment.yaml
conda activate pixel2vec

Code supports Apple M1 GPU out of the box as torch.device('mps'). On macOS, install it with:

conda env create -f .\environment-m1.yaml

Run

To train the SOTA model on the minesweeper image run command:\

python -m pixel2vec.train --experiment-file experiments/minesweeper.yaml

Note: on Windows 10 you want to set in experiments/[name].yaml file num_workers: 0, otherwise it will be super slow, vide pytorch/pytorch#12831.

Data

Example inputs are placed in subfolders in the data directory. Each data has its own directory, e.g. data/minesweeper, which contains one or more files.

Example results

The model was trained on the given Simcity image. All feature vectors were projected into 3d space, and presented as the RGB image. The result is shown on the bottom.

Input image PCA

Funding

This project is supported by the EU R&D grant POIR.01.02.00-00-0052/19 for project GearShift – building the engine of the behavior of wheeled motor vehicles and map generation based on artificial intelligence algorithms implemented on the Unreal Engine platform – GAMEINN.

About

Self supervised feature extraction trained on a single image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages