{"id":20982322,"url":"https://github.com/nashory/dense-equi-torch","last_synced_at":"2025-05-14T16:31:27.903Z","repository":{"id":89673723,"uuid":"102566176","full_name":"nashory/dense-equi-torch","owner":"nashory","description":"Torch7 implementation of Unsupervised object learning from dense equivariant image labelling","archived":false,"fork":false,"pushed_at":"2017-11-16T09:44:24.000Z","size":48,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T20:38:32.267Z","etag":null,"topics":["celeba","landmark","siamese-network","unsupervised"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/nashory.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-06T05:24:24.000Z","updated_at":"2024-02-23T02:06:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"138a90bf-bb5f-405f-833e-0c383d742c2f","html_url":"https://github.com/nashory/dense-equi-torch","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/nashory%2Fdense-equi-torch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashory%2Fdense-equi-torch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashory%2Fdense-equi-torch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashory%2Fdense-equi-torch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nashory","download_url":"https://codeload.github.com/nashory/dense-equi-torch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254182904,"owners_count":22028377,"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":["celeba","landmark","siamese-network","unsupervised"],"created_at":"2024-11-19T05:45:14.450Z","updated_at":"2025-05-14T16:31:27.897Z","avatar_url":"https://github.com/nashory.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dense-equi-torch\nTorch7 implementation of [\"Unsupervised object learning from dense equivariant image labelling\"](https://arxiv.org/abs/1706.02932)\n\n___Note: I am working on training/test regressor code to make cleaner version.___  \n___but pretraining the network for latent space mapping works prefectly now. (don't worry :))___\n\n\n# Prerequisites\n+ Torch7\n+ [thinplatspline](https://github.com/olt/thinplatespline)\n+ python 2.7\n+ other torch packages (xlua, display, hdf5, image ...)\n\n~~~\nloarocks install display\nloarocks install hdf5\nloarocks install image\nloarocks install xlua\n~~~\n\n\n\n# Usage\nfirst, download CelebA dataset [(here)](https://drive.google.com/drive/folders/0B7EVK8r0v71pWEZsZE9oNnFzTm8).\n~~~\n\u003cdata_path\u003e\n           |-- image 1\n           |-- image 2\n           |-- iamge 3 ...\n~~~\n\nTo train the feature extractor(CNN):\n~~~\n1. change options in \"script/opts.lua\" and \"data/gen_tps.py\"\n2. do \"th pretrain.lua\"\n\u003e\u003e pretrained model will saved in 'repo/pretrain/'\n~~~\n\nTo train the regressor(mlp):\n~~~\n1. change options in \"script/opts.lua\" and \"data/gen_reg.lua\"\n2. do \"th regtrain.lua\"\n\u003e\u003e trained regressor will saved in 'repo/regressor/'\n~~~\n\nTo test the regressor(mlp):\n~~~\n1. change options in \"script/opts.lua\"\n2. do \"th regtest.lua\"\n\u003e\u003e test image wih landmarks will be saved in 'repo/test'\n~~~\n\n\n# Results\n\n### (1) mapping on the latent space\n  + Red : left-mouth\n  + Purple : right-mouth\n  + Green : nose\n  + Blue : left-eye\n  + Orange : right-eye\n\n\n(https://plot.ly/~stellastra666/156/)   \n(https://plot.ly/~stellastra666/162/)\n\n![이미지1](https://puu.sh/x6mIs/8cb7ee71c9.png) \n![이미지1](https://puu.sh/x9uGm/12e5061271.png)\n\n\n\n\n### (2) landmark detection on CelebA\n\n1. good case (red: predict / green: GT)\n\n![이미지](https://puu.sh/x9DXw/b8a08644a8.png)\n![이미지](https://puu.sh/x9DXJ/87499c145c.png)\n![이미지](https://puu.sh/x9DXR/7e827d0363.png)\n![이미지](https://puu.sh/x9DY2/a9db6c35fe.png)    \n![이미지](https://puu.sh/x9DY6/860f44f4e7.png)\n![이미지](https://puu.sh/x9DYe/f6d734eef3.png)\n![이미지](https://puu.sh/x9DYl/ecae735bde.png)\n![이미지](https://puu.sh/x9DYs/16f7b374c6.png)\n\n2. badcase\n\n![이미지](https://puu.sh/x9E9P/70052b1074.png)\n![이미지](https://puu.sh/x9E9L/b79143d3ee.png)\n![이미지](https://puu.sh/x9E9B/e97da93f86.png)\n![이미지](https://puu.sh/x9E9t/02cb77ea76.png)    \n![이미지](https://puu.sh/x9E9o/7cc9298d1c.png)\n![이미지](https://puu.sh/x9E9i/aa01b2db50.png)\n![이미지](https://puu.sh/x9E9a/eb7b5d3f29.png)\n![이미지](https://puu.sh/x9E91/d765dec3a1.png)\n\n### (3) Performance Benchmark\n\n__1. Original paper__\n\n|  nLandmark |  regressor training  | IOD error|\n| ---- | --- |---|\n|10|CelebA|6.32|\n|30|CelebA|5.76|\n|50|CelebA|5.33|\n\n__2. My code__\n\n|  nLandmark |  regressor training |Iter(reg) | MSE  | IOD error|\n| ---- | --- |---|---|---|\n|100|CelebA|5K|      3.15|5.71|\n|100|CelebA|50K|      3.31|5.67|\n\n### (4) Effect of training data when fine-tuning regressor(mlp)\n\n|Training images| learning iter | training loss | MSE | IOD error|\n|---|---|---|---|---|\n| 10 | 1K | 0.04 |5.67  | 9.97  |\n| 50 | 1K | 0.09 |4.73  | 8.07  |\n| 100 | 1K | 0.13 |4.42  | 8.13  |\n| 2000 | 2K | 0.18 |3.38  | 6.28  |\n| 5000 | 3K | 0.20 |3.36  | 5.84  |\n| 15000 | 5K | 0.21 |3.15  | 5.71  |\n| 15000 | 50K | 0.21 |3.31  | 5.67  |\n\n# ACKNOWLEDGEMENT\nThank James for kindly answering my inquries and providing pieces of matlab code :)\n\n\n# Author\nMinchulShin / [@nashory](https://github.com/nashory)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnashory%2Fdense-equi-torch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnashory%2Fdense-equi-torch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnashory%2Fdense-equi-torch/lists"}