How ankanbhunia/pidm works
Project type and purpose
• This is a research-oriented deep learning pipeline for Person Image Synthesis via a Denoising Diffusion Model (PIDM). It ingests raw person images and pose keypoints, trains a diffusion-based UNet model, and produces new person images conditioned on pose or appearance inputs.
File structure
• Top-level scripts:
• train.py – distributed multi-GPU training entry point
• predict.py / PIDM_demo.ipynb – inference APIs and demo notebook
• diffusion.py, model.py – core diffusion scheduler and high-level model interface
• Directories:
• config/ – configuration loaders (YAML, .conf), hyperparameter modules
• data/ – dataset preparation and custom DataLoader wrappers (lmdb conversion)
• models/ – neural network definitions (UNet variants, pose guide network, latent nets, losses)
• utils/ – helper generation routines, inception score, other metrics
• Data assets under data/deepfashion_256x256 and raw dataset paths, organized for LMDB storage via prepare_data.py
README for additional insights
• Explains data preparation steps (OpenPose keypoints, train/test splits, LMDB creation)
• Describes training regime (distributed PyTorch DDP over 8 A100s, 300 epochs)
• Shows inference API: Predictor.predict_pose() and .predict_appearance() using DDIM sampler
• Mentions external dependencies: PyTorch, OpenPose, LMDB, Google Drive downloads
Key details to capture
• The conversion of raw images+poses to LMDB before training
• The separation of diffusion scheduler from neural net blocks
• Multi-GPU DDP orchestration in train.py
• Predictor abstraction in predict.py, supporting both pose and appearance sampling
• Evaluation hooks during and after training