{"id":19054730,"url":"https://github.com/ssbuild/detection_finetuning","last_synced_at":"2025-11-12T05:03:57.386Z","repository":{"id":203692242,"uuid":"708725497","full_name":"ssbuild/detection_finetuning","owner":"ssbuild","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-23T16:27:41.000Z","size":373,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-01-02T11:11:44.243Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssbuild.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-23T09:06:13.000Z","updated_at":"2024-04-23T16:27:45.000Z","dependencies_parsed_at":"2024-04-23T17:59:33.372Z","dependency_job_id":null,"html_url":"https://github.com/ssbuild/detection_finetuning","commit_stats":null,"previous_names":["ssbuild/detection_finetuning"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbuild%2Fdetection_finetuning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbuild%2Fdetection_finetuning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbuild%2Fdetection_finetuning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbuild%2Fdetection_finetuning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssbuild","download_url":"https://codeload.github.com/ssbuild/detection_finetuning/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240110325,"owners_count":19749283,"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-08T23:39:30.775Z","updated_at":"2025-11-12T05:03:57.326Z","avatar_url":"https://github.com/ssbuild.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"```text\r\n    2024-04-22 简化\r\n    2023-10-24 initial detection\r\n```\r\n\r\n## update information\r\n   - [deep_training](https://github.com/ssbuild/deep_training)\r\n\r\n## install\r\n  - pip install -U -r requirements.txt\r\n  - 如果无法安装， 可以切换官方源 pip install -i https://pypi.org/simple -U -r requirements.txt\r\n\r\n\r\n\r\n## weigtht select one is suitable for you\r\n支持且不限于以下权重    \r\n- [detr-resnet-50](https://huggingface.co/facebook/detr-resnet-50)\r\n- [detr-resnet-50 no_timm](https://huggingface.co/facebook/detr-resnet-50/tree/no_timm)\r\n- [detr-resnet-101](https://huggingface.co/facebook/detr-resnet-101)\r\n- [yolos-base](https://huggingface.co/hustvl/yolos-base)\r\n- [yolos-small](https://huggingface.co/hustvl/yolos-small)\r\n- [yolos-tiny](https://huggingface.co/hustvl/yolos-tiny)\r\n- [table-transformer-detection](https://huggingface.co/microsoft/table-transformer-detection)\r\n\r\n\r\n## data sample\r\n- open_data https://github.com/ssbuild/open_data\r\n- coco https://cocodataset.org/#download\r\n   \r\n单条数据示例\r\npath must\r\nbbox must\r\ncategory_id must\r\n```json\r\n{\"path\": \"/data/cv/data/coco/train2017/000000000009.jpg\", \"labels\": {\"image_id\": 9, \"annotations\": [{\"segmentation\": [[500.49, 473.53, 599.73, 419.6, 612.67, 375.37, 608.36, 354.88, 528.54, 269.66, 457.35, 201.71, 420.67, 187.69, 389.39, 192.0, 19.42, 360.27, 1.08, 389.39, 2.16, 427.15, 20.49, 473.53]], \"area\": 120057.13925, \"iscrowd\": 0, \"image_id\": 9, \"bbox\": [1.08, 187.69, 611.59, 285.84], \"category_id\": 51, \"id\": 1038967}, {\"segmentation\": [[357.03, 69.03, 311.73, 15.1, 550.11, 4.31, 631.01, 62.56, 629.93, 88.45, 595.42, 185.53, 513.44, 230.83, 488.63, 232.99, 437.93, 190.92, 429.3, 189.84, 434.7, 148.85, 410.97, 121.89, 359.19, 74.43, 358.11, 65.8]], \"area\": 44434.751099999994, \"iscrowd\": 0, \"image_id\": 9, \"bbox\": [311.73, 4.31, 319.28, 228.68], \"category_id\": 51, \"id\": 1039564}, {\"segmentation\": [[249.6, 348.99, 267.67, 311.72, 291.39, 294.78, 304.94, 294.78, 326.4, 283.48, 345.6, 273.32, 368.19, 269.93, 385.13, 268.8, 388.52, 257.51, 393.04, 250.73, 407.72, 240.56, 425.79, 230.4, 441.6, 229.27, 447.25, 237.18, 447.25, 256.38, 456.28, 254.12, 475.48, 263.15, 486.78, 271.06, 495.81, 264.28, 498.07, 257.51, 500.33, 255.25, 507.11, 259.76, 513.88, 266.54, 513.88, 273.32, 513.88, 276.71, 526.31, 276.71, 526.31, 286.87, 519.53, 291.39, 519.53, 297.04, 524.05, 306.07, 525.18, 315.11, 529.69, 329.79, 529.69, 337.69, 530.82, 348.99, 536.47, 339.95, 545.51, 350.12, 555.67, 360.28, 557.93, 380.61, 561.32, 394.16, 565.84, 413.36, 522.92, 441.6, 469.84, 468.71, 455.15, 474.35, 307.2, 474.35, 316.24, 464.19, 330.92, 438.21, 325.27, 399.81, 310.59, 378.35, 301.55, 371.58, 252.99, 350.12]], \"area\": 49577.94434999999, \"iscrowd\": 0, \"image_id\": 9, \"bbox\": [249.6, 229.27, 316.24, 245.08], \"category_id\": 56, \"id\": 1058555}, {\"segmentation\": [[434.48, 152.33, 433.51, 184.93, 425.44, 189.45, 376.7, 195.58, 266.94, 248.53, 179.78, 290.17, 51.62, 346.66, 16.43, 366.68, 1.9, 388.63, 0.0, 377.33, 0.0, 357.64, 0.0, 294.04, 22.56, 294.37, 56.14, 300.82, 83.58, 300.82, 109.08, 289.2, 175.26, 263.38, 216.9, 243.36, 326.34, 197.52, 387.03, 172.34, 381.54, 162.33, 380.89, 147.16, 380.89, 140.06, 370.89, 102.29, 330.86, 61.94, 318.91, 48.38, 298.57, 47.41, 287.28, 37.73, 259.51, 33.85, 240.14, 32.56, 240.14, 28.36, 247.57, 24.17, 271.46, 15.13, 282.11, 13.51, 296.96, 18.68, 336.34, 55.48, 391.55, 106.81, 432.87, 147.16], [62.46, 97.21, 130.25, 69.77, 161.25, 59.12, 183.52, 52.02, 180.94, 59.12, 170.93, 78.17, 170.28, 90.76, 157.05, 95.92, 130.25, 120.78, 119.92, 129.49, 102.17, 115.29, 64.72, 119.81, 0.0, 137.89, 0.0, 120.13, 0.0, 117.87]], \"area\": 24292.781700000007, \"iscrowd\": 0, \"image_id\": 9, \"bbox\": [0.0, 13.51, 434.48, 375.12], \"category_id\": 51, \"id\": 1534147}, {\"segmentation\": [[376.2, 61.55, 391.86, 46.35, 424.57, 40.36, 441.62, 43.59, 448.07, 50.04, 451.75, 63.86, 448.07, 68.93, 439.31, 70.31, 425.49, 73.53, 412.59, 75.38, 402.92, 84.13, 387.71, 86.89, 380.8, 70.77]], \"area\": 2239.2924, \"iscrowd\": 0, \"image_id\": 9, \"bbox\": [376.2, 40.36, 75.55, 46.53], \"category_id\": 55, \"id\": 1913551}, {\"segmentation\": [[473.92, 85.64, 469.58, 83.47, 465.78, 78.04, 466.87, 72.08, 472.84, 59.59, 478.26, 47.11, 496.71, 38.97, 514.62, 40.6, 521.13, 49.28, 523.85, 55.25, 520.05, 63.94, 501.06, 72.62, 482.6, 82.93]], \"area\": 1658.8913000000007, \"iscrowd\": 0, \"image_id\": 9, \"bbox\": [465.78, 38.97, 58.07, 46.67], \"category_id\": 55, \"id\": 1913746}, {\"segmentation\": [[385.7, 85.85, 407.12, 80.58, 419.31, 79.26, 426.56, 77.94, 435.45, 74.65, 442.7, 73.66, 449.95, 73.99, 456.87, 77.94, 463.46, 83.87, 467.74, 92.77, 469.39, 104.63, 469.72, 117.15, 469.39, 135.27, 468.73, 141.86, 466.09, 144.17, 449.29, 141.53, 437.1, 136.92, 430.18, 129.67]], \"area\": 3609.3030499999995, \"iscrowd\": 0, \"image_id\": 9, \"bbox\": [385.7, 73.66, 84.02, 70.51], \"category_id\": 55, \"id\": 1913856}, {\"segmentation\": [[458.81, 24.94, 437.61, 4.99, 391.48, 2.49, 364.05, 56.1, 377.77, 73.56, 377.77, 56.1, 392.73, 41.14, 403.95, 41.14, 420.16, 39.9, 435.12, 42.39, 442.6, 46.13, 455.06, 31.17]], \"area\": 2975.276, \"iscrowd\": 0, \"image_id\": 9, \"bbox\": [364.05, 2.49, 94.76, 71.07], \"category_id\": 55, \"id\": 1914001}]}}\r\n```\r\n\r\n\r\n\r\n## infer\r\n    # infer_finetuning.py 推理微调模型\r\n    # infer_lora_finetuning.py 推理微调模型\r\n     python infer_finetuning.py\r\n\r\n\r\n\r\n## training\r\n```text\r\n    # 制作数据\r\n    cd scripts\r\n    bash train_full.sh -m dataset \r\n\r\n    \r\n    注: num_process_worker 为多进程制作数据 ， 如果数据量较大 ， 适当调大至cpu数量\r\n    dataHelper.make_dataset_with_args(data_args.train_file,mixed_data=False, shuffle=True,mode='train',num_process_worker=0)\r\n    \r\n    # 全参数训练 \r\n        bash train_full.sh -m train\r\n\r\n```\r\n   \r\n\r\n## 训练参数\r\n[训练参数](args.MD)\r\n\r\n## 友情链接\r\n\r\n- [pytorch-task-example](https://github.com/ssbuild/pytorch-task-example)\r\n- [tf-task-example](https://github.com/ssbuild/tf-task-example)\r\n- [chatmoss_finetuning](https://github.com/ssbuild/chatmoss_finetuning)\r\n- [chatglm_finetuning](https://github.com/ssbuild/chatglm_finetuning)\r\n- [chatglm2_finetuning](https://github.com/ssbuild/chatglm2_finetuning)\r\n- [chatglm3_finetuning](https://github.com/ssbuild/chatglm3_finetuning)\r\n- [t5_finetuning](https://github.com/ssbuild/t5_finetuning)\r\n- [llm_finetuning](https://github.com/ssbuild/llm_finetuning)\r\n- [llm_rlhf](https://github.com/ssbuild/llm_rlhf)\r\n- [chatglm_rlhf](https://github.com/ssbuild/chatglm_rlhf)\r\n- [t5_rlhf](https://github.com/ssbuild/t5_rlhf)\r\n- [rwkv_finetuning](https://github.com/ssbuild/rwkv_finetuning)\r\n- [baichuan_finetuning](https://github.com/ssbuild/baichuan_finetuning)\r\n\r\n## \r\n    纯粹而干净的代码\r\n\r\n\r\n## 参考\r\n\r\nhttps://arxiv.org/abs/2005.12872\r\n\r\nhttps://github.com/facebookresearch/detr\r\n\r\n## Star History\r\n\r\n[![Star History Chart](https://api.star-history.com/svg?repos=ssbuild/detection_finetuning\u0026type=Date)](https://star-history.com/#ssbuild/detection_finetuning\u0026Date)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbuild%2Fdetection_finetuning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssbuild%2Fdetection_finetuning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbuild%2Fdetection_finetuning/lists"}