DiffPanoModel<T>

Models & Types · AiDotNet.Diffusion.Panorama

DiffPano model for scalable panorama generation with spherical epipolar-aware diffusion.

Inheritance: DiffusionModelBase<T> → LatentDiffusionModelBase<T> → DiffPanoModel<T>

For Beginners

DiffPano creates full 360-degree panoramic images that look consistent from every viewing angle. It understands the geometry of spherical images (like what you see in a VR headset) and ensures that all parts of the panorama connect seamlessly, even when generating from just a single photo.

How It Works

DiffPano uses spherical epipolar constraints to generate consistent 360-degree panoramic images from single or multi-view inputs. It encodes geometric relationships between panoramic viewpoints using epipolar-aware cross-attention, ensuring global consistency across the full spherical field of view.

Reference: Wang et al., “DiffPano: Scalable and Consistent Text to Panorama Generation with Spherical Epipolar-Aware Diffusion”, NeurIPS 2024

Example

var options = new DiffusionModelOptions<float> { LatentChannels = 4, DefaultInferenceSteps = 30 };
var noise = Tensor<float>.CreateRandom(new[] { 1, 4, 64, 256 });
var trainX = Tensor<float>.CreateRandom(4, 8);
var trainY = Tensor<float>.CreateRandom(4, 2);
var result = new AiModelBuilder<float, Tensor<float>, Tensor<float>>()
    .ConfigureModel(new DiffPanoModel<float>(options: options))
    .Build(trainX, trainY);
var panorama = result.Predict(noise);

Constructors

Constructor Summary
DiffPanoModel(NeuralNetworkArchitecture<T> architecture, DiffusionModelOptions<T> options, INoiseScheduler<T> scheduler, UNetNoisePredictor<T> predictor, StandardVAE<T> vae, IConditioningModule<T> conditioner, int? seed) Initializes a new DiffPano model with optional configuration.

Properties

Property Summary
IConditioningModule<T> Conditioner { get; }
INoisePredictor<T> NoisePredictor { get; }
IVAEModel<T> VAE { get; }
int LatentChannels { get; }

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()