{"id":17857330,"url":"https://github.com/kilianyp/person-multi-task-dataset","last_synced_at":"2025-03-20T15:32:07.613Z","repository":{"id":39730972,"uuid":"239165538","full_name":"kilianyp/person-multi-task-dataset","owner":"kilianyp","description":"A framework for multi-task and multi-dataset training.","archived":false,"fork":false,"pushed_at":"2022-12-27T14:58:31.000Z","size":178,"stargazers_count":6,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-01T07:21:15.733Z","etag":null,"topics":["computer-vision","multi-dataset-training","multi-task"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kilianyp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-08T16:37:06.000Z","updated_at":"2021-07-07T04:28:19.000Z","dependencies_parsed_at":"2023-01-31T04:01:57.911Z","dependency_job_id":null,"html_url":"https://github.com/kilianyp/person-multi-task-dataset","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kilianyp%2Fperson-multi-task-dataset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kilianyp%2Fperson-multi-task-dataset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kilianyp%2Fperson-multi-task-dataset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kilianyp%2Fperson-multi-task-dataset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kilianyp","download_url":"https://codeload.github.com/kilianyp/person-multi-task-dataset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221774100,"owners_count":16878410,"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":["computer-vision","multi-dataset-training","multi-task"],"created_at":"2024-10-28T03:42:03.354Z","updated_at":"2024-10-28T03:42:04.001Z","avatar_url":"https://github.com/kilianyp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\nA multi-task/multi-dataset training pytorch framework.\n\nFramework was built for \"[Visual Person Understanding through Multi-Task and Multi-Dataset Learning](https://arxiv.org/pdf/1906.03019.pdf)\".\n\nIt can train the following tasks:\n- Person ReIdentification\n- Person Pose Estimation\n- Person Body Parts Segmentation\n- Person Attribute Learning\n- Person Classification\n\nOn the following datasets:\n- Market-1501\n- Duke MTMC\n- LIP\n- MPII\n\nThe following papers are (partially) included: \n- \"In Defense of the Triplet Loss for Person Re-Identification\" [Link](https://arxiv.org/abs/1703.07737).\n- \"Learning Discriminative Features with Multiple Granularities for Person Re-Identification\" [Link](https://arxiv.org/abs/1804.01438)\n- \"Multi-Task Learning as Multi-Objective Optimization\" [Link](http://papers.nips.cc/paper/7334-multi-task-learning-as-multi-objective-optimization)\n\nVideos are from training sequences of the [MOT17](https://motchallenge.net/data/MOT17/) challenge:\n- [02](https://drive.google.com/open?id=1nq1KLH0X5j26YaLCjQOFQ8x_KydonVds)\n- [05](https://drive.google.com/open?id=1E22xH5TWhmKyj_kosb-r-16WQcWJkzCW)\n- [09](https://drive.google.com/open?id=1TNsgqN4QWHw2-m6TmgtboAi4Lw_RPTCL)\n- [10](https://drive.google.com/open?id=1J2mzWhUu6EcotEqW_C9OlXmFkZoUTDo-)\n- [11](https://drive.google.com/open?id=1iysZ0LHzagVynx6etS8SOkZsxPoZ44b1)\n\nShown model used ResNet-50 backbone. On a 1080 GTX, ~120 cropped images per second could be processed.\n\nNOTE: Ground truth bounding boxes were used. Bounding box color indicate gender. \n\n# Usage\n***Code needs clean-up and is provided as is. If there's a general interest, I will look into making things cleaner***\n\n# Requirements\n- numpy\n- Pillow\n- h5py\n- scipy\n- torch\n- torchvision\n- sacred\n- imgaug\n\nThe GroupNorm implementation stems from [here](https://github.com/chengyangfu/pytorch-groupnormalization).\n\n# Installation\npip install -r requirements.txt (for training)\n\nTo be able to use omniboard:\n- Install mongodb\n- Install npm\n- Install omniboard\n\n### For no-admin rights user:\n#### mongodb\nInstall tarball from https://docs.mongodb.com/v3.2/tutorial/install-mongodb-on-linux/\n\n#### npm\nI recommend setting npm up in such way that installed modules can be run from command line.\n\nTherefore:\n- Change the npm install directory:\n-- create a file called .npmrc with the content\n`prefix=${HOME}/.npm-packages`\n-- add the following to your .bashrc\n`# Node setup for global packages without sudo\nNPM_PACKAGES=\"${HOME}/.npm-packages\"\nNODE_PATH=\"$NPM_PACKAGES/lib/node_modules:$NODE_PATH\"\nPATH=\"$NPM_PACKAGES/bin:$PATH\"`\n\n\n#### omniboard\n`npm install omniboard`\n\n# Starting \nmongod --dbpath mongo\n## Access database from remote host\n- Create a config file with:\n`bind_ip = 127.0.0.1, ip1, ip2`\nwhere ip1 and ip2 are the assigned apis within the network the database should be accessible from.\n\nThen start mongodb with\nmongod --dbpath mongo -f mongod.conf\n\nomniboard -m host:port:db\n### Password Protect Database\n- Create admin user.\n```\nuse admin\ndb.createUser(\n  {\n    user: \"myUserAdmin\",\n    pwd: \"abc123\",\n    roles: [ { role: \"userAdminAnyDatabase\", db: \"admin\" }, \"readWriteAnyDatabase\" ]\n  }\n)\n```\n- restart database with `mongod --auth` + additional parameters\n#### Additionally\nThis is not really necessary but for one good practice but also seems to be necessary to work \ncorrectly with omniboard\n- Create another user in your experiment database\n```\nuse master\ndb.createUser(\n  {\n    user: \"myUser\",\n    pwd: \"abc123\",\n    roles: [ { role: \"readWrite\", db: \"master\" } ]\n  }\n)\n```\nFor sacred, it is possible to use the admin User, but it is more secure to use a specific, more limited user.\n```\nMONGO_USER = \"myUser\"\nMONGO_PW = \"abc123\"\nDB_NAME = \"master\"\n```\n\n## Starting Omniboard\n### without password\n`omniboard -m host:27017:master`\n### with password\nFor omniboard, I could not get it to run using the admin user (it would always connect to the admin database).\n`omniboard --mu \"mongodb://myUser:abc123@localhost/master?authMechanism=SCRAM-SHA-1\" master`\n--authSource=admin\nNo need to create another user\n\n## Connecting from cluster\nI recommend using ngrok.\n- `ngrok tcp 27017` to punsh a tunnel to your mongo database. Ngrok will give you an URL you can connect to.\n- Use this URL as your host.\n\n\n\n\n# Train\n```\npython3 main.py with configs.json\n```\n\nFor market, you can find them [here](https://github.com/VisualComputingInstitute/triplet-reid/tree/master/data):\n\n\n# Evaluation\n\nYou can use embed.py to write out embeddings that are compatible with the \nevaluation script.\n\n```\npython3 main.py evaluate_from_confipython3 main.py evaluate_experiment with evaluate.json evaluation.experiment=/dir/to/experiment\n```\nTo calculate the final scores, please use the evaluation script from \n[here](https://github.com/VisualComputingInstitute/triplet-reid#evaluating-embeddings)!\n\n# Scores without Re-rank (and pretrained models) \n### Market-1501\n#### Trinet\nSettings: \n- P=18 \n- K=4\n- dim=128\n\nDownload Model ([GoogleDrive](https://drive.google.com/open?id=1eNJuLxRz3dJ0MkVjoLP6vshxZUn_NLn0))\n\n|Test time augmentation| mAP | top-1 | top-5| top-10|\n|---|---:|---:|---:|---:|\n| None | 65.06% | 80.31% | 92.25% | 94.71% |\n| With TenCrop |  69.44% | 83.40% | 93.59% | 96.17% |\n\n\n#### MGN\n\nSettings:\n\n\n| Test time augmentation | mAP | top-1 | top-5| top-10|\n|---|---:|---:|---:|---:|\n| With Horizontal Flip | 83.17% | 93.62% | 97.86% | 98.66% |\n\n# Citing\nIf you used this project, please consider citing\n```\n@inproceedings{pfeiffer2019visual,\n  title={Visual Person Understanding Through Multi-task and Multi-dataset Learning},\n  author={Pfeiffer, Kilian and Hermans, Alexander and S{\\'a}r{\\'a}ndi, Istv{\\'a}n and Weber, Mark and Leibe, Bastian},\n  booktitle={German Conference on Pattern Recognition},\n  pages={551--566},\n  year={2019},\n  organization={Springer}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkilianyp%2Fperson-multi-task-dataset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkilianyp%2Fperson-multi-task-dataset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkilianyp%2Fperson-multi-task-dataset/lists"}