| User | luxmanramamoorthy |
|---|---|
| Publication | |
| Implementation | |
| Views | Single |
| Test image modalities | RGB-D |
| Description | 6D Pose Estimation PipelineA comprehensive computer vision pipeline for estimating 6DOF (6 Degrees of Freedom) object poses using RGB-D images. This system combines deep learning object detection with 3D point cloud registration to accurately determine the position and orientation of objects in 3D space. 🚀 Features
📋 Pipeline Overview
Stage 1: Object Detection & Segmentation
Stage 2: Point Cloud Generation
Stage 3: ROI Extraction
Stage 4: 6DOF Pose Registration
🛠️ InstallationPrerequisites
Dependencies```bash Core dependenciespip install torch torchvision opencv-python numpy open3d matplotlib scikit-learn scipy pillow pyyaml Additional system dependencies may be required for PCL``` Setup
pip install -r requirements.txt ```
⚙️ ConfigurationCreate a ```yaml Camera Configurationcamera: intrinsics_file: "config/camera_params.json" depth_scale: 0.1 Detection Configurationdetection: model_path: "models/maskrcnn_mechanical_parts.pth" categories_file: "config/categories.txt" confidence_threshold: 0.7 output_dir: "output/detection/" Point Cloud Configurationpointcloud: voxel_size: 0.01 organized: true save_intermediate: true output_dir: "output/pointclouds/" ROI Extraction Configurationroi_extraction: output_dir: "output/roi/" min_points: 100 save_rois: true Registration Configurationregistration: reference_models_dir: "reference_models/" output_dir: "output/registration/" ransac_iterations: 100000 icp_threshold: 0.1 confidence_threshold: 0.6 parallel_workers: 4 ``` 🎯 UsageComplete Pipeline```python from pose_estimation_pipeline import PoseEstimationPipeline Initialize pipelinepipeline = PoseEstimationPipeline("pipeline_config.yaml") Run complete 6D pose estimationresults = pipeline.estimate_poses( rgb_image="data/rgb_image.jpg", depth_image="data/depth_image.png", camera_params="config/camera_params.json" ) Process resultsfor result in results: if result['success'] and result['confidence'] > 0.6: print(f"Object: {result['label']}") print(f"Position: {result['translation']}") print(f"Rotation: {result['rotation_matrix']}") print(f"Confidence: {result['confidence']:.3f}") ``` Command Line Interface```bash Basic usagepython main_pipeline.py \ --rgb data/rgb_image.jpg \ --depth data/depth_image.png \ --camera config/camera_params.json \ --config pipeline_config.yaml With custom output directorypython main_pipeline.py \ --rgb data/rgb_image.jpg \ --depth data/depth_image.png \ --camera config/camera_params.json \ --config pipeline_config.yaml \ --output results/experiment_1/ Batch processingpython batch_process.py \ --input_dir data/rgb_d_sequences/ \ --config pipeline_config.yaml \ --output_dir results/batch_results/ ``` Individual ComponentsEach stage can be run independently: ```bash 1. Object detection onlypython maskrcnn/inference.py \ --image data/rgb_image.jpg \ --model models/maskrcnn_model.pth \ --output output/detections/ 2. Point cloud generation onlypython pointcloud_generator/create_pointcloud.py \ --rgb data/rgb_image.jpg \ --depth data/depth_image.png \ --camera config/camera_params.json \ --output output/scene.ply 3. ROI extraction onlypython roi_extractor/extract_rois.py \ --pointcloud output/scene.ply \ --detections output/detections/results.json \ --output output/roi/ 4. Registration onlypython registration/register_objects.py \ --source output/roi/object_1.ply \ --reference reference_models/object_1_model.ply \ --output output/registration/ ``` 📊 Input/Output FormatsInput RequirementsRGB-D Images
Camera Parameters (JSON)
Reference Models
Output Results```python Per-object pose estimation result{ 'object_id': 'bracket_001', 'label': 'bracket', 'success': True, 'confidence': 0.87, 'translation': [x, y, z], # in millimeters 'rotation_matrix': [[r11, r12, r13], # 3x3 rotation matrix [r21, r22, r23], [r31, r32, r33]], 'transformation_4x4': [...], # 4x4 homogeneous matrix 'bounding_box': [x_min, y_min, x_max, y_max], 'point_count': 1547, 'processing_time': 2.34 } ``` 🐛 TroubleshootingCommon Issues
🤝 Contributing
📄 LicenseThis project is licensed under the MIT License - see the LICENSE file for details. 🙏 Acknowledgments
|
| Computer specifications | CPU: AMD Ryzen 7 5700G with Radeon Graphics Cores: 16 RAM: 30Gi GPU: NVIDIA Corporation Device 2782 (rev a1) Storage: 1.7T OS: Ubuntu 22.04.5 LTS Kernel: 6.8.0-57-generic |
No submissions yet.