{"id":18801879,"url":"https://github.com/mitscherlich/antigen","last_synced_at":"2025-04-13T17:32:29.591Z","repository":{"id":44807056,"uuid":"188636330","full_name":"Mitscherlich/antigen","owner":"Mitscherlich","description":"My graduation design project, a face recognition service based on SeetaFaceEngine.","archived":false,"fork":false,"pushed_at":"2022-01-23T08:57:35.000Z","size":3009,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-27T20:59:37.697Z","etag":null,"topics":["docker","face-detection","face-recognition","mongodb","opencv","seetaface","seetafaceengine","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Mitscherlich.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":"2019-05-26T03:36:31.000Z","updated_at":"2024-05-27T20:59:37.697Z","dependencies_parsed_at":"2022-08-25T12:50:27.321Z","dependency_job_id":null,"html_url":"https://github.com/Mitscherlich/antigen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mitscherlich%2Fantigen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mitscherlich%2Fantigen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mitscherlich%2Fantigen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mitscherlich%2Fantigen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mitscherlich","download_url":"https://codeload.github.com/Mitscherlich/antigen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223598748,"owners_count":17171328,"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":["docker","face-detection","face-recognition","mongodb","opencv","seetaface","seetafaceengine","typescript"],"created_at":"2024-11-07T22:25:38.317Z","updated_at":"2024-11-07T22:25:38.882Z","avatar_url":"https://github.com/Mitscherlich.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=right\u003e\n\u003c!-- make browser happy :) --\u003e\n\n:us: [:cn:](README.zh-CN.md)\n\n\u003c/div\u003e\n\n# Antigen\n\nThis is my bachelor graduation design project, a face recognition service based on [SeetaFaceEngine](https://github.com/seetaface/SeetaFaceEngine). I also provided the public RESTful API. [Check this out!](https://api.mitscherlich.me/antigen)\n\n## Quick Start\n\nClone this project via `git`:\n\n```sh\n$ git clone https://github.com/Mitscherlich/antigen.git\n```\n\nTo run this project locally, you need a pc with ubuntu os installed and at least 2GB memory for [OpenCV](https://github.com/opencv/opencv) compiling. If you haven't installed opencv yet, I also provide a [script](scripts/install-opencv.sh) to compile an optimized version.\n\nThen, you need [Node.js](https://nodejs.org) to run this project. Though `apt` manager provides a package `nodejs` for ubuntu but I suggest [`nvm`](https://github.com/nvm-sh/nvm) for installation.\n\nSince [`npm`](https://www.npmjs.com) sometimes generate a wrong dependencies tree, although it is the default package manager came with node.js but [`yarn`](https://yarnpkg.com) is suggested for this project.\n\n### Setup MongoDB\n\nThis project uses [MongoDB](https://www.mongodb.com/) to store user data. You can setup a mongo server instance following their [official reference](https://docs.mongodb.com/guides/server/install/) or using [docker](https://www.docker.com/).\n\nTo setup a mongo instance with docker, follow this commands below:\n\n```sh\n# pull `mongo` docker image\n$ docker pull mongo\n$ docker run -d --name mongo-srv \\\n# expose mongo default listening port\n\u003e -p 27017:27017\n# persistence mongo data\n\u003e -v ~/db:/data/db\n\u003e mongo\n```\n\nIf you want to enable user authorization, pass `-e MONGO_INITDB_ROOT_USERNAME=\u003cname\u003e` and `-e MONGO_INITDB_ROOT_PASSWORD=\u003cpassword\u003e` to `docker run` command and replace `mongo` with `mongo --auth`.\n\n### Install dependencies\n\nSeetaFaceEngine requires opencv and openblas. Since `libopencv-dev` not provides the latest version, I suggestion install opencv from it source.\n\nFirst, you need some system dependencies for compilation:\n\n```sh\n$ sudo apt-get update\n$ sudo apt-get install -fy cmake build-essential dpkg-dev\n$ sudo apt-get install -fy libopenblas-dev libprotobuf-dev libssl-dev libgnutls28-dev libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev\n# not require if you don't need opencv-python\n$ sudo apt-get install -fy python-dev python-numpy libjpeg-dev libpng-dev libtiff-dev libjasper-dev\n```\n\nThen you can use the installation script [`install-opencv.sh`](scripts/install-opencv.sh) to install an optimized version, or compile a full-function opencv following this commands:\n\n```sh\n$ mkdir build \u0026\u0026 cd build\n$ cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON -DENABLE_PRECOMPILED_HEADERS=OFF ..\n$ make -j\u003cjobs\u003e \u0026\u0026 sudo make install\n```\n\n\u003e Jobs usually equals you machine's cpu cores amount times 1.5\n\n### Download SeetaFaceEngine models\n\nDownloads models from [here](https://drive.google.com/open?id=1qViCjBksqe6fvSHKBJpUoNpTyO8HAA2j) or [Baidu Disk](https://pan.baidu.com/s/1HJj8PEnv3SOu6ZxVpAHPXg) for mainland users.\n\n### Start dev server\n\nYou can start this project in development mode by this command:\n\n```sh\n$ yarn dev\n```\n\nThis uses [`parcel`](https://parceljs.org) bundler and [`nodemon`](https://github.com/remy/nodemon) for auto restart.\n\n### Start prod server\n\nBefore you start this project in production mode, you have to build static files:\n\n```sh\n$ yarn build\n```\n\nThen you can start the server:\n\n```sh\n$ yarn start\n```\n\n## API reference\n\nSee [docs/API-reference.md](docs/API-reference.md) for more details.\n\n## Common options\n\nThis project also accepts some common options by passing environment variables:\n\n- **HOST** `String` - The IP address this project will listen. Default is _127.0.0.1_.\n- **PORT** `String` or `Number` - The port this project will listen. Default is _3000_.\n- **BASE_URL** `String` - The prefix of router and WebSocket, Default is _'/'_.\n- **DB_URL** `String` - MongoDB server url. Default is _127.0.0.1_.\n- **DB_PORT** `String` or `Number` - MongoDB server listeing port. Default is _27017_.\n- **DB_USER** `String` - MongoDB user name. Default is _''_.\n- **DB_PSK** `String` - MongoDB user password. Default is _''_.\n\n## Docker setup\n\nThis project also provides a `docker-compose.yml` for docker setup. Install [docker-compose](https://docs.docker.com/compose/) and execute:\n\n```sh\n$ docker-compose up -d\n```\n\nThen visit http://localhost:3000 in your browser.\n\nThat's it! Have your self :)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitscherlich%2Fantigen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitscherlich%2Fantigen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitscherlich%2Fantigen/lists"}