{"id":16490441,"url":"https://github.com/alex2wong/caffeserver","last_synced_at":"2026-04-16T00:32:44.772Z","repository":{"id":115046366,"uuid":"93498211","full_name":"alex2wong/CaffeServer","owner":"alex2wong","description":"Flask backend for caffe image classification project","archived":false,"fork":false,"pushed_at":"2017-08-02T02:48:57.000Z","size":2396,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-28T01:57:07.317Z","etag":null,"topics":["caffe","flask","image-classification","pycaffe","python"],"latest_commit_sha":null,"homepage":"","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/alex2wong.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":"2017-06-06T09:03:59.000Z","updated_at":"2017-08-02T02:33:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"d199a9ca-e0e9-45e1-b252-48f2228a21b9","html_url":"https://github.com/alex2wong/CaffeServer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alex2wong/CaffeServer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex2wong%2FCaffeServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex2wong%2FCaffeServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex2wong%2FCaffeServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex2wong%2FCaffeServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex2wong","download_url":"https://codeload.github.com/alex2wong/CaffeServer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex2wong%2FCaffeServer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31866345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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":["caffe","flask","image-classification","pycaffe","python"],"created_at":"2024-10-11T13:48:01.380Z","updated_at":"2026-04-16T00:32:44.752Z","avatar_url":"https://github.com/alex2wong.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CaffeServer\nFlask backend for caffe image classification project\n\n## How it works\nThis backend server receive client upload image, then call pycaffe script to classify image, return objects detected and its property.\nresponse struct:\n```\n{\n    \"objects\":\n    [{\n        \"obj\": Array[4],\n        \"class\": String,\n        \"score\": Number\n    },\n    {}\n    ]\n}\n```\n### 基于flask提供图像分类服务\n\n根据[上一篇文章](http://www.jianshu.com/p/a83668dc4ad2)在云服务上搭建的pycaffe运行环境，为了使得这个机器学习环境能更友好地跑起来， 准备简单做一个后端服务，搭配几个简单的API，让用户可以通过网络请求来调取服务。特此开一个Github项目，记录下，后面还要做安卓平台的图像分类应用。\n[CaffeServer 项目地址](https://github.com/alex2wong/CaffeServer)\n该项目的依赖自然是pycaffe的运行环境，并且caffemodel在指定的磁盘位置。POST 请求 http://yourhost:8000/upload 端口，并且在body里带上包含图片文件的FormData，经过服务器的识别就可以返回JSON格式的识别结果：\n```\n{\n    \"objects\":\n    [{\n        \"obj\": Array[4],  //识别出对象的外包矩形\n        \"class\": String,  //标签名称，car，horse，bird ....\n        \"score\": Number  //识别结果的confidence\n    },{}]\n}\n```\n\n【更新 2017/8/2】\n提供了基于Angular4.x 构建的UI，来测试后端的CaffeServer 对象检测功能，在线[体验地址](http://111.231.11.20:3000/ngx-proj/dist/)，后端返回JSON 格式的识别结果\n\n### 题外话，评价pix2code\n\n![pix2code 图示，https://uizard.io/index.html#tech](http://upload-images.jianshu.io/upload_images/1950967-6245a3d3e935a002.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n\n针对最近比较火爆的pix2code 项目，[github地址](https://github.com/tonybeltramelli/pix2code). 可以根据Sketch或者PS的UI图直接生成UI代码，其中涉及到对DOM元素的识别和HTML代码，CSS的生成。虽然把机器学习用于代码生成看起来很高大上，不少人说AI太强了，程序猿是不是要失业了。在我看来，**不必惊慌**。就原作者的意思，这个只是个实验项目，并不成熟，目前只能做一些基础工作，用于减少工程师对UI代码的编写工作，更集中于业务的开发。\n\n而且AI项目最大的问题就是，只是生成**静态代码**，也就是View层面的代码，而Controller，Model这些最关键的部分还是得靠有经验的程序猿根据业务需求去完成，调试，并且慢慢优化。AI 短时间内还很难帮助优化网络请求，界面渲染等问题。\n\n阿里之前出了深度学习设计AI**鲁班**，也是同样道理，通过深度学习设计风格，产出设计图示，可以解决设计师的重复劳动，但这些有意思的设计风格也需要优秀的设计师花心思构思。AI 生产的图纸也需要设计师去修订，有的时候修订还不如推翻重来呢。。\n\n以下链接中有 Vue作者尤雨溪的回答，比较客观，仔细想来AI要替代前端工程师的路还远。\n[知乎：如何评价“代码直出工具”pix2code](https://www.zhihu.com/question/60352831/answer/175185625)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex2wong%2Fcaffeserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex2wong%2Fcaffeserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex2wong%2Fcaffeserver/lists"}