This repo is about the project i did in 2019 summer robot and AI of imperial college London. I wrote it for realsense camera D415 in ubuntu18.04. By the time 2019-8-10, Realsense camera python SDK only stably support Linux and Windows. So i think it may not work in Macos .
This code is wrote in python3.6
It mainly consist of three part.
- calibration part: using the opencv
findChessboardCornersfunction and depth information to fast calbrate camera.
- QR-code tracking part: i use qrcode to generate QR-code, and pyzbar to recognize every frame, then use kalman filter to stabilize the tracking
- NN model part: i use Segmentation-driven 6D Object Pose Estimation(CVPR 2019) to predict the pose of the objects in RGB image
- create a python3.6 virtual environment with pip and enter it
- enter the LachFore fold, type
pip install -r requirements.txt - install realsense SDK ,connect to the realsense camera, you can use
realsense-viewerto see if it is connected git clone https://github.com/cvlab-epfl/segmentation-driven-pose.git, download pretrained weight following the instruction of the github repo.python main.py
- most of the parameters are in
world.py - you can change the model easily, you should rewrite the class in
predict.py, which should havepredictmethod - i draw lessons from realsense code examples a lot, like the
realsense_device_manager.py, but i change it for only one camera situation.