{"id":20465629,"url":"https://github.com/kadirnar/sahi-detectron","last_synced_at":"2026-05-18T00:08:37.457Z","repository":{"id":43111486,"uuid":"461573734","full_name":"kadirnar/SAHI-Detectron","owner":"kadirnar","description":"SAHIDET2: SAHI Kullanarak Yüksek Doğruluklu Nesne Tespit Uygulaması Yap!","archived":false,"fork":false,"pushed_at":"2022-03-17T22:37:00.000Z","size":2499,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-27T09:41:19.231Z","etag":null,"topics":["deep-learning","detectron2","object-detection","pytorch"],"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/kadirnar.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":"2022-02-20T18:10:48.000Z","updated_at":"2024-09-27T22:52:36.000Z","dependencies_parsed_at":"2022-09-07T18:00:39.434Z","dependency_job_id":null,"html_url":"https://github.com/kadirnar/SAHI-Detectron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kadirnar/SAHI-Detectron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirnar%2FSAHI-Detectron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirnar%2FSAHI-Detectron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirnar%2FSAHI-Detectron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirnar%2FSAHI-Detectron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kadirnar","download_url":"https://codeload.github.com/kadirnar/SAHI-Detectron/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirnar%2FSAHI-Detectron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33160168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["deep-learning","detectron2","object-detection","pytorch"],"created_at":"2024-11-15T13:19:15.813Z","updated_at":"2026-05-18T00:08:36.329Z","avatar_url":"https://github.com/kadirnar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003e\n  SAHIDET2: SAHI Kullanarak Yüksek Doğruluklu Nesne Tespit Uygulaması Yap!\n\u003c/h1\u003e\n\u003ch4\u003e\n    \u003cimg width=\"700\" alt=\"teaser\" src=\"doc/images/detectron2_sahi.png\"\u003e\n\u003c/h4\u003e\n\u003c/div\u003e\n\n1. Kütüphanelerin Yüklenmesi:\n```\npip install -U git+https://github.com/obss/sahi.git\npip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/index.html # for Detectron2-cpu\n#pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.10/index.html # for Detectron2-cuda11.1\n```\n\n2. Kütüphanelerin Import Edilmesi:\n```\nfrom sahi.utils.detectron2 import Detectron2TestConstants\nfrom sahi.model import Detectron2DetectionModel\nfrom sahi.predict import get_sliced_prediction, predict, get_prediction\nfrom sahi.utils.file import download_from_url\nfrom sahi.utils.cv import read_image\nfrom IPython.display import Image\n```\n3. Model ve Test Resimlerinin Yüklenmesi:\n\n```\nmodel_path = download_from_url(\n    \"https://dl.fbaipublicfiles.com/detectron2/COCO-Detection/faster_rcnn_R_50_FPN_3x/137849458/model_final_280758.pkl\",\n    \"model_final_280758.pkl\")\n\nimage = download_from_url('https://raw.githubusercontent.com/obss/sahi/main/demo/demo_data/small-vehicles1.jpeg',\n                  'demo_data/small-vehicles1.jpeg')\n```\n\n4. Cfg Dosyasının Yüklenmesi:\n```\ncfg = get_cfg()\ncfg.MODEL.ROI_HEADS.NUM_CLASSES = 445\ncfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.2\nconfig_path = export_cfg_as_yaml(cfg, export_path='config.yaml')\n```\n\n5. Detectron2 Kullanarak Modelin Test Edilmesi:\n\n\n```\ndetection_model = Detectron2DetectionModel(\n    model_path=model_path,\n    config_path=config_path,\n    confidence_threshold=0.2,\n    image_size=640,\n    device=\"cpu\",  # or 'cuda:0'\n)\n\nresult = get_prediction(\"demo_data/small-vehicles1.jpeg\", detection_model)\nresult.export_visuals(export_dir=\"demo_data/\")\nImage(\"demo_data/prediction_visual.png\")\n```\n\u003cimg width=\"700\" alt=\"teaser\" src=\"doc/images/detectron2.png\"\u003e\n\n\n\n6. SAHI+ Detectron2 Model Test Edilmesi:\n```\nresult = get_sliced_prediction(\n    \"demo_data/small-vehicles1.jpeg\",\n    detection_model,\n    slice_height = 256,\n    slice_width = 256,\n    overlap_height_ratio = 0.2,\n    overlap_width_ratio = 0.2,\n)\nresult = get_prediction(\"demo_data/small-vehicles1.jpeg\", detection_model)\nresult.export_visuals(export_dir=\"demo_data/\")\nImage(\"demo_data/prediction_visual.png\")\n```\n\u003cimg width=\"700\" alt=\"teaser\" src=\"doc/images/detectron2_sahi.png\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadirnar%2Fsahi-detectron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkadirnar%2Fsahi-detectron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadirnar%2Fsahi-detectron/lists"}