{"id":20098638,"url":"https://github.com/pfnet/sfm-learner-chainer","last_synced_at":"2025-05-06T05:32:23.388Z","repository":{"id":40986745,"uuid":"116920322","full_name":"pfnet/sfm-learner-chainer","owner":"pfnet","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-21T21:18:30.000Z","size":437,"stargazers_count":14,"open_issues_count":3,"forks_count":6,"subscribers_count":100,"default_branch":"master","last_synced_at":"2025-04-09T09:11:38.494Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pfnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-10T06:57:07.000Z","updated_at":"2019-11-13T07:50:58.000Z","dependencies_parsed_at":"2022-09-02T07:41:10.072Z","dependency_job_id":null,"html_url":"https://github.com/pfnet/sfm-learner-chainer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet%2Fsfm-learner-chainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet%2Fsfm-learner-chainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet%2Fsfm-learner-chainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet%2Fsfm-learner-chainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pfnet","download_url":"https://codeload.github.com/pfnet/sfm-learner-chainer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252629305,"owners_count":21779191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T17:06:06.732Z","updated_at":"2025-05-06T05:32:22.876Z","avatar_url":"https://github.com/pfnet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SfMLearner Chainer version\nThis codebase implements the system described in the paper:\n\nUnsupervised Learning of Depth and Ego-Motion from Video [link](https://people.eecs.berkeley.edu/~tinghuiz/projects/SfMLearner/)  \nSee the [project webpage](https://people.eecs.berkeley.edu/~tinghuiz/projects/SfMLearner/) for more details.\n\nTF code: https://github.com/tinghuiz/SfMLearner\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./imgs/output_1.png\"/\u003e  \n\u003cimg src=\"./imgs/output_2.png\"/\u003e  \n\u003cimg src=\"./imgs/output_3.png\"/\u003e  \n\u003cimg src=\"./imgs/result_9.png\" width=300, height=240/\u003e\n\u003cimg src=\"./imgs/result_10.png\" width=300, height=240/\u003e\n\u003c/p\u003e\n\n## Preparing training data\nIn order to train the model using the provided code, the data needs to be formatted in a certain manner.\n\n### Depth\nFor [KiTTI](http://www.cvlibs.net/datasets/kitti/raw_data.php), first download the dataset using this [script](http://www.cvlibs.net/download.php?file=raw_data_downloader.zip) provided on the official website, and then run the following command\n```bash\npython data/prepare_train_data.py /path/to/KITTI_raw --dataset-format kitti_raw --static-frames ./data/static_frames.txt  --dump-root /path/to/KITTI_formatted --height 128 --width 416 --num-threads 8\n```\n\n### Odometry\nThis script generates only training data.  \nRemove '2011_09_26_drive_0067' sequence because there is no data at kitti server.\n```bash\npython data/prepare_train_data.py /path/to/KITTI_raw --dataset-format kitti_odom --static-frames ./data/static_frames.txt  --dump-root /path/to/KITTI_formatted --height 128 --width 416 --num-threads 8\n```\n\n## Training using KiTTI Raw Dataset\nOnce the data are formatted following the above instructions, you should be able to train the model by running the following command\n\n### Depth\n```bash\npython3 train.py experiments/sfm_learner_v1.yml\n```\n\n### Odometry\n```bash\npython3 train.py experiments/sfm_learner_v1_odom.yml\n```\n\n## Evaluation using KiTTI Raw Dataset\nIf you finish training models using above scripts, you should be able to evaluate your trained model.\n\n### Depth\nYou can obtain the single-view depth predictions on the KITTI eigen test split formatted properly for evaluation by running.  \nYou could download pretrained model from [here](https://www.dropbox.com/s/v1t4b1vao9ucqva/depth_exp02smooth01.npz)\n```bash\npython evaluate.py experiments/sfm_learner_v1_eval.yml\n```\n\n### Odometry\nYou can obtain the 5-snipped odometry predictions on the KITTI odometry dataset. This scripts use kitti raw dataset directly.\n```bash\npython evaluate.py experiments/sfm_learner_v1_odom_eval.yml --mode odom\n```\n\n| abs_rel | sq_rel | rms | log_rms | a1 | a2 | a3 |\n|:--------------:|:---------------:|:---------------:|:---------------:|:---------------:|:---------------:|:---------------:|\n| **0.1779** | **1.3594** | **6.2696** | **0.2570** | **0.7390** | **0.9075** | **0.9647** |\n\n## Inference using KiTTI Raw Dataset\n### Depth\nYou could download pretrained model from [here](https://www.dropbox.com/s/v1t4b1vao9ucqva/depth_exp02smooth01.npz)\n```bash\n# For kitti formatted dataset\npython inference.py experiments/sfm_learner_v1_test.yml\n# For a image\npython inference.py experiments/sfm_learner_v1_test.yml --img_path /path/to/img --save 1 --width 416 --height 128\n```\n\n### odometry\n```bash\n# Create predicted trajectory\npython inference.py experiments/sfm_learner_v1_odom_test.yml --mode odom\n# Visualize trajectories\npython inference.py experiments/sfm_learner_v1_odom_test.yml --mode odom --gt_file ./kitti_eval/pose_data/ground_truth/10_full.txt --pred_file ./test.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfnet%2Fsfm-learner-chainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpfnet%2Fsfm-learner-chainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfnet%2Fsfm-learner-chainer/lists"}