{"id":15606803,"url":"https://github.com/raymondcm/rasberry_perception","last_synced_at":"2025-04-12T17:06:32.620Z","repository":{"id":39538042,"uuid":"212369280","full_name":"RaymondCM/rasberry_perception","owner":"RaymondCM","description":"General purpose ROS package for using deep learning/object detection frameworks on robots","archived":false,"fork":false,"pushed_at":"2022-08-25T13:58:31.000Z","size":3607,"stargazers_count":0,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T11:21:23.756Z","etag":null,"topics":["deep-learning","detection","object-detection","perception","ros","ros-melodic"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RaymondCM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null}},"created_at":"2019-10-02T14:57:21.000Z","updated_at":"2021-12-06T09:29:25.000Z","dependencies_parsed_at":"2023-01-16T16:01:02.909Z","dependency_job_id":null,"html_url":"https://github.com/RaymondCM/rasberry_perception","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/RaymondCM%2Frasberry_perception","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaymondCM%2Frasberry_perception/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaymondCM%2Frasberry_perception/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaymondCM%2Frasberry_perception/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RaymondCM","download_url":"https://codeload.github.com/RaymondCM/rasberry_perception/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602301,"owners_count":21131615,"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":["deep-learning","detection","object-detection","perception","ros","ros-melodic"],"created_at":"2024-10-03T04:42:28.882Z","updated_at":"2025-04-12T17:06:32.587Z","avatar_url":"https://github.com/RaymondCM.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rasberry_perception\n\n![strawberry_localisation](https://user-images.githubusercontent.com/16948324/76231446-2c98b380-621d-11ea-8624-8e472c2f08f8.gif)\n\nThe rasberry_perception package aims to interleave ROS and deep learning frameworks for perception. If using any of the models in research please contact [Raymond Kirk](https://github.com/RaymondKirk) to obtain the relevant citation and ensure no conflict of interest.\n\n## Quick start\n\n```bash\nroslaunch rasberry_perception detector.launch backend:=\"detectron2\" password:=\"obtain_from_raymond\" image_ns:=\"/your_camera/colour\" depth_ns:=\"/your_camera/depth\" score:=\"0.5\"\n```\n\n## Installation\n\n[Cuda 10.2](https://developer.nvidia.com/cuda-downloads?target_os=Linux\u0026target_arch=x86_64\u0026target_distro=Ubuntu\u0026target_version=1804\u0026target_type=deblocal) must be installed locally to run gpu based backends. \n\n```bash\ncd catkin_ws/src\ngit clone https://github.com/RaymondKirk/rasberry_perception\ncatkin build rasberry_perception\n```\n\n## Detection Backends\n\nModular detection backends are available in `rasberry_perception` enabling users to utilise deep learning \nframeworks/non-ros methods to detect objects. \n\nYou can try to launch both the backend and detector with the command below:\n\n```bash\n# Run together (will download the backend from docker_hub if it exists)\nroslaunch rasberry_perception detector.launch colour_ns:=\"\" depth_ns:=\"\" score:=\"\" show_vis:=\"\" backend:=\"\" backend_arg1:=\"\"\n\n# Or run separately! (Will use a local installation of the backend if available)\nrosrun rasberry_perception detection_server.py backend:=\"\" backend_arg1:=\"\"\nroslaunch rasberry_perception detector.launch colour_ns:='' depth_ns:='' score:=''\n```\n\n### Adding a new detection backend \n\nAdding custom backends such as TensorFlow, PyTorch, Detectron, Onnx etc. to `rasberry_perception` is easy. \nSee [interfaces](src/rasberry_perception/detection/interfaces/) for examples.\n\nA simple example given in four steps, register the name in the detection registry with the class decorator (1), inherit from the \nbase (2), implement the service call logic (3) and finally add to the `__all__` definition \n[here](src/rasberry_perception/detection/interfaces/__init__.py) (4). \n\n\n```python\nimport ros_numpy\nfrom rasberry_perception.interfaces.default import BaseDetectionServer\nfrom rasberry_perception.msg import Detections, ServiceStatus\n\n@DETECTION_REGISTRY.register_detection_backend(\"CustomBackendName\")  # (1)\nclass CustomVisionBackend(BaseDetectionServer):  # (2)\n    # These args are passed from ros parameters when running the backend\n    def __init__(self, custom_arg1, custom_arg2, default_arg1=\"hello\"): \n        # Do your imports here i.e import image_to_results_function\n        # Do initialisation code here\n        self.busy = False \n        BaseDetectionServer.__init__(self)  # Spins the server and waits for requests!\n\n    def get_detector_results(self, request):  # (3)\n        if self.busy:  # Example of other status responses\n            return GetDetectorResultsResponse(status=ServiceStatus(BUSY=True))\n        # Populate a detections message\n        detections = Detections()\n        # i.e. detections = image_to_results_function(image=ros_numpy.numpify(request.image))\n        return GetDetectorResultsResponse(status=ServiceStatus(OKAY=True), results=detections)\n```\n\nWhen launching the detection server via `rosrun` or `roslaunch` you can pass in arguments to your custom backend as you \nwould usually. The node will fail if you do not pass any non-default arguments such as `custom_arg1` and `custom_arg2` \nin the example.\n\n```bash\nrosrun rasberry_perception detection_server.py  backend:=\"CustomBackendName\" _custom_arg1:=\"a1\" _custom_arg2:=\"a2\" _default_arg1\"=\"world\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraymondcm%2Frasberry_perception","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraymondcm%2Frasberry_perception","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraymondcm%2Frasberry_perception/lists"}