A production-ready tool that converts PDF lecture slides into structured study notes using AI vision and text models via the Groq API.
- 📄 Converts PDF slides to detailed summaries using vision AI
- 📝 Generates problem-solving-focused study notes
- 🔄 Batched processing for efficient API usage
- 📊 Progress tracking with tqdm
- 🔧 Configurable via environment variables
- ⚡ Automatic retry with exponential backoff
- Python 3.8+
- Groq API key (Get one here)
- poppler-utils (for PDF to image conversion)
macOS:
brew install popplerUbuntu/Debian:
sudo apt-get install poppler-utilsWindows: Download from poppler releases and add to PATH.
- Clone the repository:
git clone <repository-url>
cd lecture_parsing- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Configure environment:
cp .env.template .env
# Edit .env and add your GROQ_API_KEY-
Place your PDF lecture files in the
PDFs/directory -
Run the parser:
python main.py- Find generated notes in the
Summaries/directory
All configuration can be done via the .env file:
GROQ_API_KEY: Your Groq API key
VISION_MODEL: Vision model to use (default:meta-llama/llama-4-scout-17b-16e-instruct)TEXT_MODEL: Text model to use (default:openai/gpt-oss-20b)PDF_DIR: Input directory for PDFs (default:PDFs)SUMMARY_DIR: Output directory for summaries (default:Summaries)TMP_IMG_DIR: Temporary directory for slide images (default:tmp_slide_imgs)SLIDES_PER_BATCH: Number of slides to process per batch (default:20)MAX_IMG_PIXELS: Maximum pixels per image (default:33000000)MAX_IMG_SIZE_MB: Maximum image file size in MB (default:4)
Each processed PDF generates a Markdown file containing:
- Study Notes: Problem-solving focused summary with:
- Core formulas and definitions
- Key concepts and intuition
- Problem-solving strategies
- Common pitfalls
- Raw Slide Summaries: Detailed summaries of each slide
- Automatic retry with exponential backoff for API calls
- Individual PDF processing errors don't stop the entire batch
lecture_parsing/
├── main.py # Main application
├── requirements.txt # Python dependencies
├── .env.template # Environment variable template
├── .env # Your configuration (git-ignored)
├── README.md # This file
├── PDFs/ # Input PDFs
└── Summaries/ # Generated notes (auto-created)