Neural Art EEG-to-Image Model
This repository contains a custom PyTorch latent diffusion checkpoint trained with the
neural-art repository code. It generates images conditioned on Emotiv Epoch X style
EEG input.
Learn more about Neural Art
Github: https://github.com/alinvdu/neural-art Youtube: https://www.youtube.com/watch?v=8v_EB73m6cQ
Files
generative/checkpoints/checkpoint.pth: fine-tuned latent diffusion checkpoint.generative/checkpoints/checkpoint-eeg.pth: EEG encoder checkpoint required by the current inference code.config15.yaml: model architecture configuration.generative/: custom model code copied fromsrc/generation-service/generative.inference.py: small helper for loading the model from this Hub repository.
Usage
This is custom PyTorch code, not a standard transformers or diffusers pipeline.
Install the runtime dependencies, clone this repository, and run inference from the
repository root.
pip install -r requirements.txt
import torch
from inference import NeuralArtPipeline
pipe = NeuralArtPipeline(device="cuda" if torch.cuda.is_available() else "cpu")
# EEG input should match the training/inference shape used by the original repo:
# a 2D tensor/array with shape [channels, time].
eeg = torch.randn(14, 1024)
images = pipe(eeg, num_samples=2, ddim_steps=100)
for i, image in enumerate(images):
image.save(f"sample_{i}.png")
Intended Use
Research and experimentation with EEG-conditioned image generation. This model was developed for data compatible with an Emotiv Epoch X 14-channel headset and the preprocessing pipeline in the original repository.
Limitations
- The model depends on custom repository code.
- Inputs outside the training distribution may produce poor or unstable results.
- The current loader expects both the diffusion checkpoint and the EEG encoder checkpoint.
Citation / Credits
Original repository: neural-art
Architecture credit in the source repository: DreamDiffusion.