{"id":13716417,"url":"https://github.com/ignacio-rocco/detectorch","last_synced_at":"2025-05-07T05:33:00.147Z","repository":{"id":143255709,"uuid":"124268491","full_name":"ignacio-rocco/detectorch","owner":"ignacio-rocco","description":"Detectorch - detectron for PyTorch","archived":false,"fork":false,"pushed_at":"2018-10-30T12:41:48.000Z","size":2542,"stargazers_count":558,"open_issues_count":11,"forks_count":72,"subscribers_count":28,"default_branch":"master","last_synced_at":"2024-11-14T04:34:46.698Z","etag":null,"topics":["detectron","instance-segmentation","object-detection","object-segmentation","python","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ignacio-rocco.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":"2018-03-07T17:08:40.000Z","updated_at":"2024-09-24T15:39:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"562f9093-7c77-4938-a036-b55381f116eb","html_url":"https://github.com/ignacio-rocco/detectorch","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/ignacio-rocco%2Fdetectorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignacio-rocco%2Fdetectorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignacio-rocco%2Fdetectorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignacio-rocco%2Fdetectorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ignacio-rocco","download_url":"https://codeload.github.com/ignacio-rocco/detectorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252823411,"owners_count":21809704,"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":["detectron","instance-segmentation","object-detection","object-segmentation","python","pytorch"],"created_at":"2024-08-03T00:01:10.297Z","updated_at":"2025-05-07T05:33:00.139Z","avatar_url":"https://github.com/ignacio-rocco.png","language":"Jupyter Notebook","readme":"# Detectorch  - detectron for PyTorch\n\n(Disclaimer: this is work in progress and does not feature all the functionalities of detectron. Currently only inference and evaluation are supported -- no training)\n(News: Now supporting FPN and ResNet-101!)\n\nThis code allows to use some of the [Detectron models for object detection from Facebook AI Research](https://github.com/facebookresearch/Detectron/) with PyTorch.\n\nIt currently supports:\n\n- Fast R-CNN\n- Faster R-CNN\n- Mask R-CNN\n\nIt supports ResNet-50/101 models with or without FPN. The pre-trained models from caffe2 can be imported and used on PyTorch.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"demo/output/sample.jpg\" width=\"700px\" /\u003e\n  \u003cp\u003eExample Mask R-CNN with ResNet-101 and FPN.\u003c/p\u003e\n\u003c/div\u003e\n\n## Evaluation\nBoth bounding box evaluation and instance segmentation evaluation where tested, yielding the same results as in the Detectron caffe2 models. These results below have been computed using the PyTorch code:\n\n| Model | box AP | mask AP |  model id |\n| --- | --- | --- | --- |\n| [fast_rcnn_R-50-C4_2x](https://s3-us-west-2.amazonaws.com/detectron/36224046/12_2017_baselines/fast_rcnn_R-50-C4_2x.yaml.08_22_57.XFxNqEnL/output/train/coco_2014_train%3Acoco_2014_valminusminival/generalized_rcnn/model_final.pkl) | 35.6 | | 36224046 |\n| [fast_rcnn_R-50-FPN_2x](https://s3-us-west-2.amazonaws.com/detectron/36225249/12_2017_baselines/fast_rcnn_R-50-FPN_2x.yaml.08_40_18.zoChak1f/output/train/coco_2014_train%3Acoco_2014_valminusminival/generalized_rcnn/model_final.pkl) | 36.8 | | 36225249 | \n| [e2e_faster_rcnn_R-50-C4_2x](https://s3-us-west-2.amazonaws.com/detectron/35857281/12_2017_baselines/e2e_faster_rcnn_R-50-C4_2x.yaml.01_34_56.ScPH0Z4r/output/train/coco_2014_train%3Acoco_2014_valminusminival/generalized_rcnn/model_final.pkl) | 36.5 | | 35857281 |\n| [e2e_faster_rcnn_R-50-FPN_2x](https://s3-us-west-2.amazonaws.com/detectron/35857389/12_2017_baselines/e2e_faster_rcnn_R-50-FPN_2x.yaml.01_37_22.KSeq0b5q/output/train/coco_2014_train%3Acoco_2014_valminusminival/generalized_rcnn/model_final.pkl) | 37.9 | | 35857389 |\n| [e2e_mask_rcnn_R-50-C4_2x](https://s3-us-west-2.amazonaws.com/detectron/35858828/12_2017_baselines/e2e_mask_rcnn_R-50-C4_2x.yaml.01_46_47.HBThTerB/output/train/coco_2014_train%3Acoco_2014_valminusminival/generalized_rcnn/model_final.pkl) | 37.8  | 32.8 | 35858828 |\n| [e2e_mask_rcnn_R-50-FPN_2x](https://s3-us-west-2.amazonaws.com/detectron/35859007/12_2017_baselines/e2e_mask_rcnn_R-50-FPN_2x.yaml.01_49_07.By8nQcCH/output/train/coco_2014_train%3Acoco_2014_valminusminival/generalized_rcnn/model_final.pkl)| 38.6 | 34.5 | 35859007 | \n| [e2e_mask_rcnn_R-101-FPN_2x](https://s3-us-west-2.amazonaws.com/detectron/35861858/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml.02_32_51.SgT4y1cO/output/train/coco_2014_train:coco_2014_valminusminival/generalized_rcnn/model_final.pkl) | 40.9 | 36.4 | 35861858 |\n\n\n## Training\nTraining code is experimental. See `train_fast.py` for training Fast R-CNN. It seems to work, but slow.\n\n## Installation\nFirst, clone the repo with `git clone --recursive https://github.com/ignacio-rocco/detectorch` so that you also clone the Coco API.\n\nThe code can be used with PyTorch 0.3.1 or PyTorch 0.4 (master) under Python 3. Anaconda is recommended. Other required packages\n\n- torchvision (`conda install torchvision -c soumith`)\n- opencv (`conda install -c conda-forge opencv `)\n- cython (`conda install cython`)\n- matplotlib (`conda install matplotlib`)\n- scikit-image (`conda install scikit-image`)\n- ninja (`conda install ninja`) *(required for Pytorch 0.4 only)*\n\nAdditionally, you need to build the Coco API and RoIAlign layer. See below.\n\n#### Compiling the Coco API\nIf you cloned this repo with `git clone --recursive` you should have also cloned the cocoapi in `lib/cocoapi`. Compile this with:\n```\ncd lib/cocoapi/PythonAPI\nmake install\n```\n\n\n#### Compiling RoIAlign\nThe RoIAlign layer was converted from the caffe2 version. There are two different implementations for each PyTorch version:\n\n- Pytorch 0.4: RoIAlign using ATen library (lib/cppcuda). Compiled JIT when loaded.\n- PyTorch 0.3.1: RoIAlign using TH/THC and cffi (lib/cppcuda_cffi). Needs to be compiled with:\n\n``` \ncd lib/cppcuda_cffi\n./make.sh \n```\n\n## Quick Start\nCheck the demo notebook. \n","funding_links":[],"categories":["Pytorch \u0026 related libraries｜Pytorch \u0026 相关库","Pytorch \u0026 related libraries","Jupyter Notebook","Model Deployment library"],"sub_categories":["CV｜计算机视觉:","CV:","PyTorch \u003ca name=\"pytorch\"/\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignacio-rocco%2Fdetectorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fignacio-rocco%2Fdetectorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignacio-rocco%2Fdetectorch/lists"}