diff --git a/README.md b/README.md index 36bf7b18ed6d7bc4a840bd6731557bad3961d353..667400166278aaf3b81bf1a35c45a89380981da5 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ - [Results](#results) - [Trained Checkpoints](#trained-checkpoints) - [Tips for your own dataset](#tips-for-your-own-dataset) +- [Citations](#citations) - [License](#license) ## Overview @@ -179,5 +180,17 @@ You can download the trained DenseFusion and Iterative Refinement models of both ## Tips for your own dataset As you can see in this repo, the network code and the hyperparameters(lr and w) remain the same for both datasets. Which means you might not need to adjust too much on the network structure and hyperparameters when you use this repo on your own dataset. Please make sure that the distance metric in your dataset should be converted to meter, otherwise the hyperparameter w need to be adjusted. Several useful tools including [LabelFusion](https://github.com/RobotLocomotion/LabelFusion) and [sixd_toolkit](https://github.com/thodan/sixd_toolkit) has been tested to work well. (Please make sure to turn on the depth image collection in LabelFusion when you use it.) + +## Citations +Please cite [DenseFusion](https://sites.google.com/view/densefusion) if you use this repository in your publications: +``` +@article{wang2019densefusion, + title={DenseFusion: 6D Object Pose Estimation by Iterative Dense Fusion}, + author={Wang, Chen and Xu, Danfei and Zhu, Yuke and Mart{\'\i}n-Mart{\'\i}n, Roberto and Lu, Cewu and Fei-Fei, Li and Savarese, Silvio}, + journal={arXiv preprint arXiv:1901.04780}, + year={2019} +} +``` + ## License Licensed under the [MIT License](LICENSE) \ No newline at end of file diff --git a/datasets/linemod/dataset.py b/datasets/linemod/dataset.py index 16d3e387a422e1fcb3e98892c5a6397a56385421..a5aacdc34b9dee0ef5dff0a0785225e80e423a60 100755 --- a/datasets/linemod/dataset.py +++ b/datasets/linemod/dataset.py @@ -157,8 +157,8 @@ class PoseDataset(data.Dataset): cloud = np.add(cloud, add_t) #fw = open('evaluation_result/{0}_cld.xyz'.format(index), 'w') - #for target in cloud: - # fw.write('{0} {1} {2}\n'.format(target[0], target[1], target[2])) + #for it in cloud: + # fw.write('{0} {1} {2}\n'.format(it[0], it[1], it[2])) #fw.close() model_points = self.pt[obj] / 1000.0 @@ -167,8 +167,8 @@ class PoseDataset(data.Dataset): model_points = np.delete(model_points, dellist, axis=0) #fw = open('evaluation_result/{0}_model_points.xyz'.format(index), 'w') - #for tt in model_points: - # fw.write('{0} {1} {2}\n'.format(tt[0], tt[1], tt[2])) + #for it in model_points: + # fw.write('{0} {1} {2}\n'.format(it[0], it[1], it[2])) #fw.close() target = np.dot(model_points, target_r.T) @@ -180,8 +180,8 @@ class PoseDataset(data.Dataset): out_t = target_t / 1000.0 #fw = open('evaluation_result/{0}_tar.xyz'.format(index), 'w') - #for tt in target: - # fw.write('{0} {1} {2}\n'.format(tt[0], tt[1], tt[2])) + #for it in target: + # fw.write('{0} {1} {2}\n'.format(it[0], it[1], it[2])) #fw.close() return torch.from_numpy(cloud.astype(np.float32)), \ diff --git a/datasets/ycb/dataset.py b/datasets/ycb/dataset.py index 2670a2b10e97f708868894c764d1b20c6361bdf1..183cd311da9a2eaa2d021d2eeec4d1914158f06f 100755 --- a/datasets/ycb/dataset.py +++ b/datasets/ycb/dataset.py @@ -197,8 +197,8 @@ class PoseDataset(data.Dataset): cloud = np.add(cloud, add_t) # fw = open('temp/{0}_cld.xyz'.format(index), 'w') - # for target in cloud: - # fw.write('{0} {1} {2}\n'.format(target[0], target[1], target[2])) + # for it in cloud: + # fw.write('{0} {1} {2}\n'.format(it[0], it[1], it[2])) # fw.close() dellist = [j for j in range(0, len(self.cld[obj[idx]]))] @@ -209,8 +209,8 @@ class PoseDataset(data.Dataset): model_points = np.delete(self.cld[obj[idx]], dellist, axis=0) # fw = open('temp/{0}_model_points.xyz'.format(index), 'w') - # for target in model_points: - # fw.write('{0} {1} {2}\n'.format(target[0], target[1], target[2])) + # for it in model_points: + # fw.write('{0} {1} {2}\n'.format(it[0], it[1], it[2])) # fw.close() target = np.dot(model_points, target_r.T) @@ -220,8 +220,8 @@ class PoseDataset(data.Dataset): target = np.add(target, target_t) # fw = open('temp/{0}_tar.xyz'.format(index), 'w') - # for tt in target: - # fw.write('{0} {1} {2}\n'.format(tt[0], tt[1], tt[2])) + # for it in target: + # fw.write('{0} {1} {2}\n'.format(it[0], it[1], it[2])) # fw.close() return torch.from_numpy(cloud.astype(np.float32)), \