How dougsm/ggcnn works
Project type and purpose
• This is an open-source robotics/machine-learning tool (a PyTorch port of the GG-CNN) for real-time, pixel-wise generative grasp synthesis from depth images.
• It provides data loaders for the Cornell and Jacquard datasets, scripts for preprocessing, training (train_ggcnn.py), evaluating (eval_ggcnn.py), and visualization, and two model definitions (ggcnn.py, ggcnn2.py).
File structure
• Top level:
• train_ggcnn.py, eval_ggcnn.py – entry-point scripts for training and evaluation.
• models/ – network definitions and common utilities.
• utils/ – data ingestion (utils/data/), dataset processing (utils/dataset_processing/), timing helpers, visualization (utils/visualisation/).
• requirements.txt – external dependencies (PyTorch, NumPy, etc.).
• Patterns: single-process, modular ML pipeline (data → preprocessing → model → training/eval → visualization).
• External assets: Cornell and Jacquard datasets; optional ROS integration in separate repos.
README insights
• Describes data preparation steps and supported datasets.
• Details how to load pretrained weights or train from scratch.
• Highlights evaluation options (IoU metric, Jacquard output).
Detailing is key
• That train_ggcnn.py invokes the GGCNN or GGCNN2 class from models/.
• Outputs folder (output/models) as a persistent artifact store.
• Don’t hesitate to add as many components as exist in the codebase—better to show every major folder and script.
• Component boundaries reflect actual file/package boundaries for easy mapping back to source code.