{"id":17254202,"url":"https://github.com/fizzday/imagecropsmart","last_synced_at":"2026-03-03T01:37:02.913Z","repository":{"id":61967421,"uuid":"130800888","full_name":"fizzday/imageCropSmart","owner":"fizzday","description":"image smart crop with opencv in python (图片智能裁剪, 获取更优化的裁剪结果, 包括人像, 主要建筑物等, 通过计算, 智能裁剪出相对理想的图片)","archived":false,"fork":false,"pushed_at":"2018-04-24T05:47:01.000Z","size":305,"stargazers_count":51,"open_issues_count":1,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-21T06:57:36.605Z","etag":null,"topics":["image","image-crop","opencv","python","smart","smart-crop"],"latest_commit_sha":null,"homepage":null,"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/fizzday.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":"2018-04-24T05:30:02.000Z","updated_at":"2025-02-11T12:52:46.000Z","dependencies_parsed_at":"2022-10-24T11:00:23.331Z","dependency_job_id":null,"html_url":"https://github.com/fizzday/imageCropSmart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fizzday/imageCropSmart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzday%2FimageCropSmart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzday%2FimageCropSmart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzday%2FimageCropSmart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzday%2FimageCropSmart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fizzday","download_url":"https://codeload.github.com/fizzday/imageCropSmart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzday%2FimageCropSmart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30029704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T00:31:48.536Z","status":"ssl_error","status_checked_at":"2026-03-03T00:30:56.176Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["image","image-crop","opencv","python","smart","smart-crop"],"created_at":"2024-10-15T07:07:44.322Z","updated_at":"2026-03-03T01:37:02.879Z","avatar_url":"https://github.com/fizzday.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# image smart crop(图片智能裁剪)  \n\n## description\n\nSmart crops images uisng OpenCV, forked from `epixelic/python-smart-crop`, and improve more\n\nUses the algorithms described in https://github.com/thumbor/thumbor/wiki/Detection-algorithms but actually combining both methods. We try to detect faces on the image, then, in any case we detect features. We then combine both results with different weights, so face detection is, in this case 3,33 times stronger than feature detection.\n\n## Installing\n\nRequires python-opencv, install the dependency with `pip install python-opencv`\n\nInstall the command using PIP: `pip install git+https://github.com/fizzday/imageCropSmart`\n\nTested on Debian 8 and Ubuntu WSL and mac 10.13.1\n\n## Usage\n- #### *command line*\nUsage: `smartcrop -W 640 -H 360 -i input.jpg -o output.jpg`\n\nSee `smartcrop --help` \n\n- #### *python source code*  \n```python\nimport smartcrop\n\nimg_input = \"input.jpg\"\nimg_output = \"output.jpg\"\nimg_width = 400\nimg_height = 300\n\nsmartcrop.smart_crop(img_input, img_width, img_height, img_output, None)\n``` \n\nAny Case : you can run the code in `./smartcrop/_init_.py`\n\n\n## example1\n- input.jpg  \n    ![input.jpg](https://raw.githubusercontent.com/fizzday/imageCropSmart/master/smartcrop/input.jpg)  \n    - crop  \n    ```\n    smartcrop -W 400 -H 300 -i input.jpg -o output.jpg\n    ```\n    ![output.jpg](https://raw.githubusercontent.com/fizzday/imageCropSmart/master/smartcrop/output.jpg)  \n    \n## example2\n- input2.jpg  \n    ![input2.jpg](https://raw.githubusercontent.com/fizzday/imageCropSmart/master/smartcrop/input2.jpg)  \n    ```\n    smartcrop -W 400 -H 300 -i input2.jpg -o output2.jpg\n    ```\n    ![output2.jpg](https://raw.githubusercontent.com/fizzday/imageCropSmart/master/smartcrop/output2.jpg) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizzday%2Fimagecropsmart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffizzday%2Fimagecropsmart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizzday%2Fimagecropsmart/lists"}