{"id":26569151,"url":"https://github.com/hamza-cpp/paddle_layout","last_synced_at":"2026-05-02T10:35:42.355Z","repository":{"id":282471525,"uuid":"948691647","full_name":"Hamza-cpp/paddle_layout","owner":"Hamza-cpp","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-14T20:13:05.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T21:27:38.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hamza-cpp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-03-14T19:31:37.000Z","updated_at":"2025-03-14T20:13:08.000Z","dependencies_parsed_at":"2025-03-14T21:27:43.094Z","dependency_job_id":null,"html_url":"https://github.com/Hamza-cpp/paddle_layout","commit_stats":null,"previous_names":["hamza-cpp/paddle_layout"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamza-cpp%2Fpaddle_layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamza-cpp%2Fpaddle_layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamza-cpp%2Fpaddle_layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamza-cpp%2Fpaddle_layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hamza-cpp","download_url":"https://codeload.github.com/Hamza-cpp/paddle_layout/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245015113,"owners_count":20547358,"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":"2025-03-22T20:20:23.326Z","updated_at":"2026-05-02T10:35:37.336Z","avatar_url":"https://github.com/Hamza-cpp.png","language":"Python","readme":"# Document Layout API\n\nA Flask-based REST API for document layout analysis using PaddlePaddle's PP-DocLayout model.\n\n## Overview\n\nThis API provides an endpoint for analyzing document layouts from uploaded images using PP-DocLayout-L, a model that can detect and classify document components such as text blocks, tables, figures, and more.\n\n## API Endpoints\n\n### Health Check\n\n```\nGET /health\n```\n\nReturns the health status of the API and whether GPU is enabled.\n\n**Example Response:**\n\n```json\n{\n  \"status\": \"healthy\",\n  \"gpu_enabled\": false\n}\n```\n\n### Document Layout Analysis\n\n```\nPOST /predict\n```\n\nAnalyzes the layout of a document from an uploaded file.\n\n**Request:**\n\n- Content-Type: multipart/form-data\n- Body:\n  - `file`: The document file to analyze\n\n**Example Response:**\n\n```json\n{\n  \"message\": \"Prediction successful\",\n  \"inference_time\": 1.2345,\n  \"device\": \"CPU\",\n  \"results\": [\n    {\n      \"page_index\": 0,\n      \"data\": [\n        {\n          \"category\": \"text\",\n          \"bbox\": [100, 100, 500, 200],\n          \"score\": 0.98\n        },\n        {\n          \"category\": \"table\",\n          \"bbox\": [100, 300, 500, 600],\n          \"score\": 0.95\n        }\n      ]\n    }\n  ]\n}\n```\n\n## Usage\n\n1. Start the server:\n\n   ```bash\n   python app.py\n   ```\n\n2. The API will be available at \u003chttp://localhost:5000\u003e\n\n3. To analyze a document, send a POST request to the /predict endpoint with a file upload:\n\n   ```bash\n   curl -X POST -F \"file=@example.pdf\" http://localhost:5000/predict\n   ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamza-cpp%2Fpaddle_layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamza-cpp%2Fpaddle_layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamza-cpp%2Fpaddle_layout/lists"}