{"id":16677340,"url":"https://github.com/kernelerr/paddlenode","last_synced_at":"2025-04-09T21:24:05.158Z","repository":{"id":54382862,"uuid":"277324820","full_name":"KernelErr/paddlenode","owner":"KernelErr","description":"A third-party node.js addon for Paddle Inference.","archived":false,"fork":false,"pushed_at":"2021-02-22T06:29:30.000Z","size":1141,"stargazers_count":8,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T22:42:03.888Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/KernelErr.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":"2020-07-05T15:03:12.000Z","updated_at":"2022-08-06T02:08:49.000Z","dependencies_parsed_at":"2022-08-13T14:00:51.862Z","dependency_job_id":null,"html_url":"https://github.com/KernelErr/paddlenode","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KernelErr%2Fpaddlenode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KernelErr%2Fpaddlenode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KernelErr%2Fpaddlenode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KernelErr%2Fpaddlenode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KernelErr","download_url":"https://codeload.github.com/KernelErr/paddlenode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248113240,"owners_count":21049811,"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":[],"created_at":"2024-10-12T13:26:04.077Z","updated_at":"2025-04-09T21:24:05.137Z","avatar_url":"https://github.com/KernelErr.png","language":"C++","readme":"# paddle node\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FKernelErr%2Fpaddlenode.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FKernelErr%2Fpaddlenode?ref=badge_shield)\n\nA third-party node.js addon for Paddle Inference. The beginning two versions of paddle node are using Paddle Lite for backbone, but we use Paddle Inference instead as it is more compatible for x86_64 platform.\n\nTested on Windows 10, Node.js v12.16.3.\n\nCurrent features:\n\n- Import combined model.\n- Infer from float array.\n- Image classification from file.\n\n## Methods\n\n#### set_combined_model\n\n```javascript\npaddlenode.set_combined_model(ModelDir)\n```\n\n#### infer_float\n\n```javascript\npaddlenode.infer_float(Data, Size)\n```\n\n#### image_file_classification\n\n```javascript\npaddlenode.image_file_classification(ImagePath, InputSize, Scalefactor, Mean, swapRB)\n```\n\n## Example\n\n### Image Classification\n\n```javascript\nvar paddlenode = require('./paddlenode');\npaddlenode.set_combined_model('./mobilenetv1');\nvar res = paddlenode.image_file_classfication(\"test.jpg\",[1, 3, 224, 224],0.007843,[224,224],[0.485,0.456,0.406], false)\nconsole.log('Result', res.indexOf(Math.max(...res)));\n```\n\n### Sample Vector\n\n```javascript\nvar paddlenode = require('./paddlenode');\npaddlenode.set_combined_model('./mobilenetv1');\nvar arr = new Array(150528);\nfor(var i=0; i\u003carr.length; i++) arr[i]=1;\npaddlenode.infer_float(arr,[1, 3, 224, 224]);\n```\n\nThe array returned is calculated from the model. But we manually add an element to indicate the size of the array, it's located at the first position.\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FKernelErr%2Fpaddlenode.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FKernelErr%2Fpaddlenode?ref=badge_large)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkernelerr%2Fpaddlenode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkernelerr%2Fpaddlenode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkernelerr%2Fpaddlenode/lists"}