Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nemo

Live Demo Next.js TypeScript Three.js FastAPI License

Built by Ishaan Goel

The first brand intelligence platform built on cortical neuroscience. See your brand through 200 simulated brains — before you spend a dollar on media.

Nemo uses Meta FAIR's TRIBE v2 foundation model to generate fMRI-grade BOLD signal predictions across 20,484 cortical vertices for any uploaded brand video. It runs those predictions through 200 AI consumer personas and surfaces a deep neuroscience report telling you exactly which brain regions engaged, when they peaked, how well the message encoded into memory, and where attention dropped.


What it does

Upload a video. Within seconds, Nemo:

  1. Encodes the video into brain space using TRIBE v2 — a tri-modal (video + audio + language) foundation model trained on 720 subjects and 1,000+ hours of fMRI data from Meta FAIR.
  2. Streams live cortical activations over WebSocket — a 3D brain mesh lights up in real-time as each segment is processed, coloring all 20,484 vertices with predicted BOLD signal.
  3. Generates a Cortical Brand Intelligence Report across 10+ sections:
    • 7 composite scores (Brand Impact, Recall, Attention, Multimodal Synergy, Emotional Signal, Memory Encoding, Cortical Depth)
    • Per-region breakdowns for Visual (V1/V4/MT+), Auditory (A1/Belt/STS), Language (Broca 44/45, Wernicke, Angular), and Executive (DLPFC/ACC/FEF) cortex
    • Cortical processing order (V1 → A1 → MT+ → Broca → Wernicke → DLPFC)
    • Multimodal integration score — measures the gain at the temporal-parietal-occipital junction (TPOJ) when all three modalities converge
    • Memory encoding quality (sustained Broca + Wernicke predicts 24h recall)
    • Language left-lateralization index
    • Emotional signal from Angular gyrus / TPJ
    • Prioritized risk flags and optimization recommendations
  4. Timeline scrubber — a segment-by-segment cortical timeline below the brain. Click any segment to rewind the mesh to that exact moment, showing which regions were active at that second.
  5. 200 AI consumer personas react in real-time with comments as the analysis streams in — across generations, industries, psychographics, and global markets.
  6. Ideation workspace — describe your product, get AI-generated target segments, hooks, KPIs, and platform fit visualized as an interactive React Flow graph with web-sourced evidence via Scout.
  7. Voice agent — conversational interface for querying your brand report hands-free using Vapi.

Every metric has a plain-English label so non-neuroscientists can act on data immediately.


Tech stack

Backend

Layer Technology
API server FastAPI + uvicorn
Real-time streaming WebSockets (asyncio queue per job)
Brain model TRIBE v2 (Meta FAIR) — tri-modal fMRI foundation model, 720 subjects
Cortical atlas Destrieux surface atlas on fsaverage5 via nilearn — 17 anatomically correct ROIs
Audio transcription whisperX
Tensor framework PyTorch
Numerical computing NumPy

Key backend files:

  • backend/inference.py — TRIBE v2 wrapper + Destrieux atlas loader. Maps 20,484 fsaverage5 vertices to 17 ROIs across 4 cognitive dimensions.
  • backend/scoring.py — Deterministic brand scoring engine: 15+ metrics computed from cortical activations (multimodal synergy, emotional signal, memory encoding, language lateralization, peak latencies, visual hierarchy check, risk flags).
  • backend/main.py — FastAPI app: /api/analyze upload endpoint + /ws/brain/{job_id} WebSocket stream.

Frontend

Layer Technology
Framework Next.js 15 (App Router)
Language TypeScript
3D brain rendering Three.js — OBJ mesh loader, vertex colors, OrbitControls, raycasting for click-to-inspect
Ideation graph React Flow — auto-layouted node graph of segments, hooks, KPIs
Animations Framer Motion
Auth Auth0 + Supabase
State Zustand
Database MongoDB + Mongoose
AI Cohere (embeddings + generation)
Voice Vapi
Web research Playwright + Cheerio (Scout crawler)

Brain atlas

The 3D brain mesh is an fsaverage5 cortical surface (10,242 vertices per hemisphere, 20,484 bilateral). ROI assignments come from the Destrieux surface parcellation via nilearn. 17 ROIs mapped to 4 cognitive dimensions:

Dimension Regions
Visual V1, V2/V3, V4/FFC, MT+/MST, V-dorsal
Auditory A1 (Heschl's), A-belt, STS
Language Broca 44, Broca 45, Wernicke, Angular, STS-lang
Executive DLPFC, FEF/SMA, ACC, Superior Frontal

How the scoring works

All metrics are computed deterministically from TRIBE v2 BOLD predictions — no LLM, no lookup table.

Metric Formula
Brand Impact 0.40 × attention + 0.35 × recall + 0.15 × (1 − exec_penalty) + 0.10 × sensory_mean
Recall 0.55 × language_processing + 0.45 × memory_encoding
Attention Retention 0.40 × visual + 0.30 × auditory + 0.30 × language − executive_penalty
Multimodal Synergy Geometric mean of V/A/L modalities × balance factor (TPOJ convergence gain)
Memory Encoding Sustained Broca + Wernicke BOLD (phonological loop + semantic encoding proxy)
Emotional Signal Angular gyrus + TPJ sustained activation
Language Lateralization Broca 44/45 left-hemisphere dominance index

Research basis

Key neuroscience findings incorporated into the scoring model:

  • FFA activates for faces, PPA for scenes, EBA for bodies, VWFA for written text
  • Language response propagates from primary auditory cortex (~3s) to inferior frontal gyrus
  • Left-hemisphere lateralization is a reliable predictor of language encoding
  • Maximum multimodal gain occurs at the TPOJ when audio, visual, and language signals are temporally aligned
  • Five ICA components identified: auditory, language, motion, default mode, visual

TRIBE v2 paper: d'Ascoli et al. 2026 (Meta FAIR)


Running locally

Backend

cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install whisperx nilearn torch
uvicorn main:app --port 8001 --reload

On first run, TRIBE v2 weights (~4 GB) are downloaded from HuggingFace (facebook/tribev2) and cached locally.

Frontend

cd frontend
npm install
npm run dev

App runs on http://localhost:3000.

Environment variables

Variable Description
NEXT_PUBLIC_BACKEND_URL FastAPI server URL (default http://localhost:8001)
AUTH0_SECRET / AUTH0_CLIENT_ID / AUTH0_CLIENT_SECRET Auth0 credentials
NEXT_PUBLIC_SUPABASE_URL / NEXT_PUBLIC_SUPABASE_ANON_KEY Supabase project
MONGODB_URI MongoDB connection string
COHERE_API_KEY Cohere API key
VAPI_API_KEY Vapi voice agent key

Project structure

nemo/
├── backend/
│   ├── main.py           # FastAPI server, WebSocket streaming
│   ├── inference.py      # TRIBE v2 wrapper, Destrieux atlas ROI loader
│   ├── scoring.py        # Brand scoring engine (15+ cortical metrics)
│   └── requirements.txt
└── frontend/
    └── src/
        ├── app/
        │   ├── analyze/      # Core analysis workspace — upload, 3D brain, report
        │   ├── tunnel/       # Ideation workspace — React Flow segment graph
        │   ├── dashboard/    # Project & session management
        │   ├── projects/     # Project list view
        │   ├── report/[id]/  # Shareable report page
        │   ├── compare/      # Side-by-side brand report comparison
        │   └── voice-agent/  # Vapi conversational interface
        └── components/
            ├── brain-3d.tsx           # Three.js cortical surface renderer
            ├── simulation-dashboard.tsx # 200-persona live feed
            ├── voice-agent.tsx        # Vapi voice interface
            ├── flow/                  # React Flow nodes + drawers
            └── globe-3d.tsx           # 3D globe visualization

Roadmap

v1.1 — Shareable report URLs, PDF export, segment comparison overlays

v1.2 — Multi-video A/B testing, frame-level attention heatmap export, Slack integration

v2.0Swarm intelligence layer — scale from 200 personas to millions of simulated consumers using distributed agent swarms, enabling statistically significant population-level cortical predictions across global demographics in real time


Built by Ishaan Goel

About

Predict how a real human brain responds to your brand video using fMRI-grade BOLD signal predictions

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages