{"id":22771585,"url":"https://github.com/pyresearch/pyresearch","last_synced_at":"2025-08-18T13:09:46.625Z","repository":{"id":73341372,"uuid":"604724595","full_name":"pyresearch/pyresearch","owner":"pyresearch","description":"Computer Vision Helping Library","archived":false,"fork":false,"pushed_at":"2024-11-05T07:51:55.000Z","size":1982,"stargazers_count":41,"open_issues_count":16,"forks_count":8,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-27T06:28:42.594Z","etag":null,"topics":["artificialintelligence","datascience","google","machine","machine-learning","machinelearning","mediapipe","opencv","pypi","pyresearch","python","pythonresearch","researchtools","visualization"],"latest_commit_sha":null,"homepage":"https://pyresearch.org/","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/pyresearch.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,"zenodo":null}},"created_at":"2023-02-21T16:55:08.000Z","updated_at":"2025-07-08T23:52:11.000Z","dependencies_parsed_at":"2024-01-16T14:03:48.735Z","dependency_job_id":"d8663f9c-eb02-43aa-8cac-4490c25da79f","html_url":"https://github.com/pyresearch/pyresearch","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"7e2bb254f0cdaf6a3b5798443af564ac39753fa4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pyresearch/pyresearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyresearch%2Fpyresearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyresearch%2Fpyresearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyresearch%2Fpyresearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyresearch%2Fpyresearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyresearch","download_url":"https://codeload.github.com/pyresearch/pyresearch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyresearch%2Fpyresearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270997275,"owners_count":24682012,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["artificialintelligence","datascience","google","machine","machine-learning","machinelearning","mediapipe","opencv","pypi","pyresearch","python","pythonresearch","researchtools","visualization"],"created_at":"2024-12-11T16:14:18.955Z","updated_at":"2025-08-18T13:09:46.595Z","avatar_url":"https://github.com/pyresearch.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://pyresearch.org/\" target=\"_blank\"\u003e\n      \u003cimg width=\"100%\" src=\"https://github.com/pyresearch/pyresearch/blob/main/pyresearch.jpeg\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n    \n\n[English](README.md) | [简体中文](README.md)\n\u003c/div\u003e    \n    \n    \n\n\n## Installation\nYou can  simply use pip to install the latest version of pyresearch.\n\n## \u003cdiv align=\"center\"\u003e`pip install pyresearch`\u003c/div\u003e\n\n\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://github.com/pyresearch/pyresearch\" style=\"text-decoration:none;\"\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226594737-c21e2dda-9cc6-42ef-b4e7-a685fea4a21d.png\" width=\"2%\" alt=\"\" /\u003e\u003c/a\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226595799-160b0da3-c9e0-4562-8544-5f20460f7cc9.png\" width=\"2%\" alt=\"\" /\u003e\n      \u003ca href=\"https://www.linkedin.com/company/pyresearch/\" style=\"text-decoration:none;\"\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226596446-746ffdd0-a47e-4452-84e3-bf11ec2aa26a.png\" width=\"2%\" alt=\"\" /\u003e\u003c/a\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226595799-160b0da3-c9e0-4562-8544-5f20460f7cc9.png\" width=\"2%\" alt=\"\" /\u003e\n    \u003ca href=\"https://twitter.com/Noorkhokhar10\" style=\"text-decoration:none;\"\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226599162-9b11194e-4998-440a-ba94-c8a5e1cdc676.png\" width=\"2%\" alt=\"\" /\u003e\u003c/a\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226595799-160b0da3-c9e0-4562-8544-5f20460f7cc9.png\" width=\"2%\" alt=\"\" /\u003e    \n    \u003ca href=\"https://www.youtube.com/@Pyresearch\" style=\"text-decoration:none;\"\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226599904-7d5cc5c0-89d2-4d1e-891e-19bee1951744.png\" width=\"2%\" alt=\"\" /\u003e\u003c/a\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226595799-160b0da3-c9e0-4562-8544-5f20460f7cc9.png\" width=\"2%\" alt=\"\" /\u003e\n    \u003ca href=\"https://www.facebook.com/Pyresearch\" style=\"text-decoration:none;\"\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226600380-a87a9142-e8e0-4ec9-bf2c-dd6e9da2f05a.png\" width=\"2%\" alt=\"\" /\u003e\u003c/a\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226595799-160b0da3-c9e0-4562-8544-5f20460f7cc9.png\" width=\"2%\" alt=\"\" /\u003e\n    \u003ca href=\"https://www.instagram.com/pyresearch/\" style=\"text-decoration:none;\"\u003e  \n      \u003cimg src=\"https://user-images.githubusercontent.com/34125851/226601355-ffe0b597-9840-4e10-bbef-43d6c74b5a9e.png\" width=\"2%\" alt=\"\" /\u003e\u003c/a\u003e      \n  \u003c/div\u003e\n\n\n\n\u003chr\u003e\n\n### 60 FPS Face Detection\n\n\u003cpre\u003e\nfrom pyresearch.FaceDetectionModule import FaceDetector\nimport cv2\n\ncap = cv2.VideoCapture(0)\ndetector = FaceDetector()\n\nwhile True:\n    success, img = cap.read()\n    img, bboxs = detector.findFaces(img)\n\n    if bboxs:\n        # bboxInfo - \"id\",\"bbox\",\"score\",\"center\"\n        center = bboxs[0][\"center\"]\n        cv2.circle(img, center, 5, (255, 0, 255), cv2.FILLED)\n\n    cv2.imshow(\"Image\", img)\n    if cv2.waitKey(1) \u0026 0xFF == ord('q'):\n        break\ncap.release()\ncv2.destroyAllWindows()\n\n\u003c/pre\u003e\n\n\n\n\u003cp align=\"center\"\u003e\n\u003cvideo src=\"https://user-images.githubusercontent.com/34125851/226322060-6e7da509-718b-40b7-8515-ea84e93687ec.mov\"\u003e\u003c/video\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n\n### Face Mesh Detection\n\u003chr\u003e\n\n\n\u003cpre\u003e\n\nfrom pyresearch.FaceMeshModule import FaceMeshDetector\nimport cv2\n\ncap = cv2.VideoCapture(0)\ndetector = FaceMeshDetector(maxFaces=2)\nwhile True:\n    success, img = cap.read()\n    img, faces = detector.findFaceMesh(img)\n    if faces:\n        print(faces[0])\n    cv2.imshow(\"Image\", img)\n    if cv2.waitKey(1) \u0026 0xFF == ord('q'):\n        break\ncap.release()\ncv2.destroyAllWindows()\n\n\u003c/pre\u003e\n\n\n\n\u003cp align=\"center\"\u003e\n\u003cvideo src=\"https://user-images.githubusercontent.com/34125851/226390465-0c400a81-b3f7-4384-b057-d1b5a9531f5b.mov\"\u003e\u003c/video\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n\n\n\n\n\n### FPS\n\u003chr\u003e\n\n\n\u003cpre\u003e\n\nimport pyresearch\nimport cv2\n\nfpsReader = pyresearch.FPS()\n\ncap = cv2.VideoCapture(0)\n\n\ncap.set(3, 1280)\n\ncap.set(4, 720)\n\nwhile True:\n\n    success, img = cap.read()\n   \n    fps, img = fpsReader.update(img,pos=(50,80),color=(0,255,0),scale=5,thickness=5)\n   \n    cv2.imshow(\"Image\", img)\n   \n    if cv2.waitKey(1) \u0026 0xFF == ord('q'):\n   \n        break\n\ncap.release()\ncv2.destroyAllWindows()\n\n\u003c/pre\u003e\n\n\n\n\u003cp align=\"center\"\u003e\n\u003cvideo src=\"https://user-images.githubusercontent.com/34125851/226392480-efd10445-6d6c-4878-b67b-152c4ec50726.mov\"\u003e\u003c/video\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n\n\n\n\n\n### Stack Images\n\n\u003chr\u003e\n\n\n\u003cpre\u003e\n\nimport pyresearch\nimport cv2\n\ncap = cv2.VideoCapture(0)\ncap.set(3, 1280)\ncap.set(4, 720)\n\nwhile True:\n    success, img = cap.read()\n    imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n    imgList = [img, img, imgGray, img, imgGray, img,imgGray, img, img]\n    stackedImg = pyresearch.stackImages(imgList, 3, 0.4)\n\n    cv2.imshow(\"stackedImg\", stackedImg)\n    if cv2.waitKey(1) \u0026 0xFF == ord('q'):\n        break\ncap.release()\ncv2.destroyAllWindows()\n\n\n\u003c/pre\u003e\n\n\n\n\u003cp align=\"center\"\u003e\n\u003cvideo src=\"https://user-images.githubusercontent.com/34125851/226393643-cddf28df-781d-47bf-8ec8-9f25ca53d311.mov\"\u003e\u003c/video\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n\n\n### Hand Tracking\n\n\u003chr\u003e\n\n\n#### Basic Code Example \n\u003cpre\u003e\nfrom pyresearch.HandTrackingModule import HandDetector\nimport cv2\n\ncap = cv2.VideoCapture(0)\n\ndetector = HandDetector(detectionCon=0.8, maxHands=2)\n\nwhile True:\n    # Get image frame\n\n    success, img = cap.read()\n\n    # Find the hand and its landmarks\n\n    hands, img = detector.findHands(img)  # with draw\n\n    # hands = detector.findHands(img, draw=False)  # without draw\n\n    if hands:\n\n        # Hand 1\n\n        hand1 = hands[0]\n\n        lmList1 = hand1[\"lmList\"]  # List of 21 Landmark points\n\n        bbox1 = hand1[\"bbox\"]  # Bounding box info x,y,w,h\n\n        centerPoint1 = hand1['center']  # center of the hand cx,cy\n\n        handType1 = hand1[\"type\"]  # Handtype Left or Right\n\n        fingers1 = detector.fingersUp(hand1)\n\n        if len(hands) == 2:\n            # Hand 2\n            hand2 = hands[1]\n            lmList2 = hand2[\"lmList\"]  # List of 21 Landmark points\n            bbox2 = hand2[\"bbox\"]  # Bounding box info x,y,w,h\n            centerPoint2 = hand2['center']  # center of the hand cx,cy\n            handType2 = hand2[\"type\"]  # Hand Type \"Left\" or \"Right\"\n\n            fingers2 = detector.fingersUp(hand2)\n\n            # Find Distance between two Landmarks. Could be same hand or different hands\n            length, info, img = detector.findDistance(lmList1[8], lmList2[8], img)  # with draw\n            # length, info = detector.findDistance(lmList1[8], lmList2[8])  # with draw\n    # Display\n    cv2.imshow(\"Image\", img)\n    cv2.waitKey(1)\ncap.release()\ncv2.destroyAllWindows()\n\n\u003c/pre\u003e\n\n \n\n\u003cp align=\"center\"\u003e\n\u003cvideo src=\"https://user-images.githubusercontent.com/34125851/226536806-863d82e6-3dc5-4c43-8d4e-ec52b874a085.mov\"\u003e\u003c/video\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n\n### Pose Estimation\n\n\u003chr\u003e\n\n\u003cpre\u003e\nfrom pyresearch.PoseModule import PoseDetector\nimport cv2\n\ncap = cv2.VideoCapture(0)\ndetector = PoseDetector()\nwhile True:\n    success, img = cap.read()\n    img = detector.findPose(img)\n    lmList, bboxInfo = detector.findPosition(img, bboxWithHands=False)\n    if bboxInfo:\n        center = bboxInfo[\"center\"]\n        cv2.circle(img, center, 5, (255, 0, 255), cv2.FILLED)\n\n    cv2.imshow(\"Image\", img)\n    if cv2.waitKey(1) \u0026 0xFF == ord('q'):\n        break\ncap.release()\ncv2.destroyAllWindows()\n\n\u003c/pre\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cvideo src=\"https://user-images.githubusercontent.com/34125851/226541583-a74d89e0-8bbf-4a26-81eb-e75112ea3947.mov\"\u003e\u003c/video\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n\n\n\n\n### Real-Time-Background-Remover-through-Human-Segmentation\n\n\n\u003chr\u003e\n\n\u003cpre\u003e\nimport cv2\nfrom pyresearch.SelfiSegmentationModule import SelfiSegmentation\n\n# connecting the internal camera (first camera index will be 0, it is the default)\ncap = cv2.VideoCapture(0)\n\n# extracting the camera capture size\nwidth, height = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH )), int( cap.get(cv2.CAP_PROP_FRAME_HEIGHT ))\n\n# loading and resizing the background image\nbackground_image = cv2.resize(cv2.imread(\"bg_image.jpeg\"), (width, height)) \n\n# creating segmentation instance for taking the foreground (the person).\nsegmentor = SelfiSegmentation()\n\n# iterating the camera captures\nwhile True:\n    # Reading the captured images from the camera\n    ret, frame = cap.read()\n\n    # segmenting the image\n    segmentated_img = segmentor.removeBG(frame, background_image, threshold=0.9)\n\n    # concatenating the images horizontally\n    concatenated_img = cv2.hconcat([frame, segmentated_img])\n\n    #cv2.imshow(\"Camera Capture\", concatenated_img)\n    cv2.imshow(\"Camera Live\", concatenated_img)\n\n    # ending condition\n    if cv2.waitKey(1) == ord('q'):\n        break\n\n# relasing the sources\ncap.release()\ncv2.destroyAllWindows()\n\u003c/pre\u003e\n\n\n\u003cp align=\"center\"\u003e\n\u003cvideo src=\"https://user-images.githubusercontent.com/34125851/236666751-efd9b342-034c-4c9f-ac51-e706cb42481c.mov\"\u003e\u003c/video\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n\n### Heatmap \u0026 Tracking Objects using YOLOv8 ByteTrack \u0026 Supervision\n\n\n\u003chr\u003e\n\n\u003cpre\u003e\n\nimport argparse\nfrom pyresearch.heatmap_and_track import process_video\n\ndef main():\n    # Define the arguments as a dictionary\n    args = {\n        \"source_weights_path\": \"yolov8s.pt\",\n        \"source_video_path\": \"people-walking.mp4\",\n        \"target_video_path\": \"output.mp4\",\n        \"confidence_threshold\": 0.35,\n        \"iou_threshold\": 0.5,\n        \"heatmap_alpha\": 0.5,\n        \"radius\": 25,\n        \"track_threshold\": 0.35,\n        \"track_seconds\": 5,\n        \"match_threshold\": 0.99,\n        \"display\": True,\n    }\n\n    # Convert the dictionary to an argparse Namespace object\n    args_namespace = argparse.Namespace(**args)\n\n    # Call the process_video function with the Namespace object\n    process_video(args_namespace)\n\nif __name__ == \"__main__\":\n    main()\n  \u003c/pre\u003e\n\n\n\n[![Watch the video](https://github.com/pyresearch/pyresearch/blob/main/Heatmap%20%26%20Tracking%20Objects%20using%20YOLOv8%20ByteTrack%20%26%20Supervision.png)](https://youtu.be/KYSPbSPBgXM)\n\n\n## Buy Us a Beer!\n\nThis Pyresearch platform is funded by donations only. Please support us to maintain and further improve our computer vision solutions!\n\n\u003ca href=\"https://liberapay.com/pyresearch/donate\"\u003e\u003cimg alt=\"Donate using Liberapay\" src=\"https://liberapay.com/assets/widgets/donate.svg\"\u003e\u003c/a\u003e\n\n\n\nMuch more information about the self-sufficienty challenge : [Pyresearch](http://tamataocean.com)  \n[contact@pyresearch.org](mailto:contact@pyresearch.org)\n\n","funding_links":["https://liberapay.com/pyresearch/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyresearch%2Fpyresearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyresearch%2Fpyresearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyresearch%2Fpyresearch/lists"}