Giter Site home page Giter Site logo

craves.ai's Introduction

CRAVES: Controlling Robotic Arm with a Vision-based, Economic System

This is the code for pose estimation module of CRAVES. If you want to test on the OWI-535 hardware, please refer the control module here.

The craves.ai project controls a toy robotic arm (OWI-535) with a single RGB camera. Please see the system pipeline and how it works in docs/README.md first before trying the code. The following animation shows the arm controlling by a mounted camera to reach a goal without relying on any other sensors.

reach-demo

Here are some visualization result from the YouTube dataset:

youtube_heatmap

./data_generation/load_data_and_vis.py contains samples on how to visualize the images and their annotations.

Dataset Download

We created three datasets for this project, namely synthetic, lab and youtube.

Download the datasets from here.

For the usage of these datasets, please refer to here.

Pose Estimation

  1. Download the checkpoint for the pretrained model here and put it into a folder, e.g. ./checkpoint/checkpoint.pth.tar.

  2. Create a folder for result saving, e.g. ./saved_results.

  3. Open ./scripts/val_arm_reall.sh. Make sure --data-dir, --resume and --save-result-dir match with the folder where you put the datasets, the pre-train model and the saved result in, respectively. For example, --data-dir ../data/test_20181024 --resume ../checkpoint/checkpoint.pth.tar --save-result-dir ../saved_results

  4. cd ./scripts then run sh val_arm_reall.sh and you can see the accuracy on the real lab dataset.

The output you should expect to see:

sh val_arm_reall.sh
=> creating model 'hg', stacks=2, blocks=1
=> loading checkpoint '../checkpoint/checkpoint.pth.tar'
=> loaded checkpoint '../checkpoint/checkpoint.pth.tar' (epoch 30)
    Total params: 6.73M
No. images of dataset 1 : 428
merging 1 datasets, total No. images: 428
No. minibatches in validation set:72

Evaluation only
Processing |################################| (72/72) Data: 0.000000s | Batch: 0.958s | Total: 0:01:08 | ETA: 0:00:01 | Loss: 0.0009 | Acc:  0.9946

As you can see, the overall accuracy on the lab dataset is 99.46% under the [email protected] metric.

Other shell scripts you may want to try:

  • train_arm.sh and train_arm_concat.sh: train a model from scratch with synthetic dataset only and with multiple datasets, respectively.
  • val_arm_syn.sh: evaluate model on synthetic dataset
  • val_arm_reall_with_3D: evaluate model on synthetic dataset, giving both 2D and 3D output.
  • val_arm_youtube.sh and val_arm_youtube_vis_only.sh: evaluate model on youtube dataset, with all keypoints and only visible keypoints, respectively.

Dependencies: pytorch with version 0.4.1 or higher, OpenCV

The 2D pose estimation module is developed based on pytorch-pose.

Data Generation from Simulator

Download the binary for Windows or Linux (tested in Ubuntu 16.04).

Unzip and run ./LinuxNoEditor/ArmUE4.sh.

Run the following script to generate images and ground truth

pip install unrealcv imageio
cd ./data_generation
python demo_capture.py

Generated data are saved in ./data/new_data by default. You can visualize the groundtruth with the script ./data_generation/load_data_and_vis.py.

Control System

The control module of CRAVES is hosted in another repo, https://github.com/zfw1226/craves_control.

Please see this repo for hardware drivers, pose estimator, a PID-like controller, and a RL-based controller.

Citation

If you found CRAVES useful, please consider citing:

@article{zuo2019craves,
  title={CRAVES: Controlling Robotic Arm with a Vision-based, Economic System},
  author={Zuo, Yiming and Qiu, Weichao and Xie, Lingxi and Zhong, Fangwei and Wang, Yizhou and Yuille, Alan L},
  journal={CVPR},
  year={2019}
}

Contact

If you have any question or suggestions, please open an issue in this repo. Thanks.

Disclaimer: authors are a group of scientists working on computer vision research. They are not associated with the company manufactures this arm. If you have a better hardware to recommend, or want to apply this technique to your arm, please contact us.

craves.ai's People

Contributors

cclauss avatar qiuwch avatar zfw1226 avatar zuoym15 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

craves.ai's Issues

Where is the semi supervision in train

 Hello!Your work is wonderful and gives me a lot of inspiration. 
 But I have a question:where is the semi supervision algorithm in train?The paper says that you incorporate iterative algo�rithm with stochastic gradient descent.
Thank you very much!

5f94c27a2b61668143c0225703254c8

How to get the owi535 bone location in UnrealCV ?

I want to get the owi535 bone location in UnrealCV to get the keypoints dataset of owi535, but i did not see the relative code in your github repository.

I think you used the add a new command function in UnrealCV, and i have tried, but i did not success. So if it's convenient, can you give me the relative code to me. My email address is "[email protected]". Thaks a lot !

what does "parent" in meta means?

Deat author,
I have questions on what "parent" means in data/meata, they are defined as -1,0,1. Could you explain what does that mean?
Thank you

How to reproduce your project?

I am trying to reproduce your paper and learn from it, but the process is not smooth. Run train_ arm.py , an error occurred. The link is a screenshot. I think it may be my dataset file path error, but I'm not sure. So, I want to know how to set the dataset path and program path with you.
Looking forward to receiving your reply, thank you!
批注 2020-06-15 154328

what does camera parameters mean

Dear author,
I have question on what 6 camera parameters mean. I'm not sure where the camera is? Is it attached to the arm or put on the table? Can it move and rotate? what does the 6 parameters means.
I'm looking forward to your reply. Thanks for your time.

The problem of data

The data ft_20181105/d3_preds has 2786 items but ft_20181105/imgs ft_20181105/imgs and ft_20181105/visualization has 2856 items. and also, the four data-zip always extract failed. Hope you renew the data. Thank you !

How to run your project on widows 10

Please, where do I start. I downloaded all the files. Datasets, etc

I tried running the pose estimation script, bash val_arm_reall.sh, in command line, it's not recognizing the python modules

Please help. I am newbie to GitHub projects

How to get joints info by changing demo_capture.py

Hi,
I noticed that there are 72 float printed when I ran demo_capture.py. Are they X, Y, Z values of 24 vertexes as same as info in json files in vertex directory? In train_arm.py, target data are composed with vertex info and joint info. Thus if they are vertexes' values, how to get joints info using commands to complement training data from 3D model?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.