{"id":20035877,"url":"https://github.com/ghostjat/darknet","last_synced_at":"2025-06-18T03:06:10.947Z","repository":{"id":62510574,"uuid":"338055919","full_name":"ghostjat/darknet","owner":"ghostjat","description":"php ffi darknet","archived":false,"fork":false,"pushed_at":"2021-05-12T14:14:29.000Z","size":22135,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-05T05:35:28.551Z","etag":null,"topics":["cnn","darknet","detection","lib-darknet","object-detection","php","php-darknet","php-ffi","php-library","php7","php8","yolo","yolo-tiny","yolov2","yolov3","yolov4"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/ghostjat.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":"2021-02-11T14:41:58.000Z","updated_at":"2024-07-17T14:46:23.000Z","dependencies_parsed_at":"2022-11-02T13:01:53.553Z","dependency_job_id":null,"html_url":"https://github.com/ghostjat/darknet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ghostjat/darknet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostjat%2Fdarknet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostjat%2Fdarknet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostjat%2Fdarknet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostjat%2Fdarknet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostjat","download_url":"https://codeload.github.com/ghostjat/darknet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostjat%2Fdarknet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260477922,"owners_count":23015064,"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":["cnn","darknet","detection","lib-darknet","object-detection","php","php-darknet","php-ffi","php-library","php7","php8","yolo","yolo-tiny","yolov2","yolov3","yolov4"],"created_at":"2024-11-13T10:09:35.787Z","updated_at":"2025-06-18T03:06:05.927Z","avatar_url":"https://github.com/ghostjat.png","language":"PHP","readme":"# php-darknet\n[![Minimum PHP version: 7.4.0](https://img.shields.io/badge/php-7.4.0%2B-blue.svg)]\n[![Packagist](https://img.shields.io/packagist/v/ghostjat/php-darknet.svg)](https://packagist.org/packages/ghostjat/darknet)\n[![Build Status](https://scrutinizer-ci.com/g/ghostjat/php-darknet/badges/build.png?b=main)](https://scrutinizer-ci.com/g/ghostjat/php-darknet/build-status/main)\n[![Code Intelligence Status](https://scrutinizer-ci.com/g/ghostjat/php-darknet/badges/code-intelligence.svg?b=main)](https://scrutinizer-ci.com/code-intelligence)\n\n![Darknet Logo](darknet.png)\n\nphp-ffi experiment\n=========\nphp interface to the lib-darknet for object detection.\nPhp7.4+ is required\n\nInstall\n---------\ncomposer require ghostjat/darknet\n\nDescription\n-----------\n[lib-darknet](https://github.com/pjreddie/darknet) \n\n# Darknet #\nDarknet is an open source neural network framework written in C and CUDA. It is fast, easy to install, and supports CPU and GPU computation.\n\n* It offers a simple API.\n* High performance, due to the fact that it uses native interface elements.\n* Fast learning by the user, due to the simplicity of its API.\n# yolo v2, v3, v4 #\n\nIf running on cpu you may use FASTEST cfg \u0026 weight for real time object detection on MS COCO dataset.\n```php\n\nrequire '../vendor/autoload.php';\n\nuse darknet\\core;\n$dn = new core(core::YOLOFASTEST);\n```\nSystem-Conf:- \n    CPU:- Intel(R) Core(TM) i3-2370M CPU @ 2.40GHz 64bit\n    MEM:- 8GB\n    Dataset:- MS-COCO Classes:- 80\n   \n|  YOLO     |   Time (ms)     |   CPU     | Mem(mb)(max)  |\n|-----------|-----------------|-----------|---------------|\n| Tiny-v2   | 0.85933095 (max)|   78      |     143.59    |\n|           | 0.62237596 (min)|           |               |\n| Tiny-v3   | 0.93895602 (max)|   90      |     125.9     |\n|           | 0.60306811 (min)|           |               |\n| Main-v3   | **15.4672219 (max)**|   98  |     964.5     |\n|           | 14.0677847 (min)|           |               |\n| Tiny-v4   | 0.85933095 (max)|   82      |     151.9     |\n|           | 0.62237596 (min)|           |               |\n| FASTEST   | 0.20039399 (max)|   20      |     97.47     |\n|           | **0.11836814 (min)**|       |               |\n| FASTEST-xl| 0.80017591 (max)|   69      |     131.85    |\n|           | 0.22637511 (min)|           |               |\n\nSynopsis\n--------\nWARNING:  \nThis module is in its early stages and should be considered a Work in Progress.\nThe interface is not final and may change in the future.  \n\nSample:\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/ghostjat/php-darknet/blob/main/php-darknet.gif\" alt='demo'\u003e\n\u003cimg src=\"https://raw.github.com/ghostjat/php-darknet/master/temp/out/gp.jpg\" alt=\"gp\"/\u003e\n\u003cimg src =\"https://raw.github.com/ghostjat/php-darknet/master/temp/out/dog.jpg\" alt =\"dog\"/\u003e\n\u003cimg src =\"https://raw.github.com/ghostjat/php-darknet/master/temp/out/eagle.jpg\" alt =\"egale\"/\u003e\n\u003cimg src =\"https://raw.github.com/ghostjat/php-darknet/master/temp/out/giraffe.jpg\" alt =\"giraffe\"/\u003e\n\u003cimg src=\"https://raw.github.com/ghostjat/php-darknet/master/temp/out/person.jpg\" alt=\"person\"/\u003e\n\u003c/p\u003e\n\nSample code:\n\n```php\n\nrequire '../vendor/autoload.php';\n\nuse darknet\\core;\n$lib = '/home/ghost/bin/c-lib/darknet/data/';\n$img = ['eagle.jpg','giraffe.jpg','horses.jpg','person.jpg','kite.jpg'];\n$dn = new core();\nforeach ($img as $value) {\n    $dn-\u003edetect($lib.$value);\n}\n```\nAuthor\n------\nShubham Chaudhary \u003cghost.jat@gmail.com\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostjat%2Fdarknet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostjat%2Fdarknet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostjat%2Fdarknet/lists"}