The deployment framework aims to provide a simple, lightweight, fast integrated, pipelined deployment framework that ensures reliability, high concurrency and scalability of services.

Overview

Savior

save your time.

只在Ubuntu18.04下完成全部测试,其他平台暂时未测试。

目前项目还处于早期开发阶段,如有任何问题,欢迎添加微信nsnovio,备注部署,进群交流。

背景

savior是一个能够进行快速集成算法模块并支持高性能部署的轻量开发框架。能够帮助将团队进行快速想法验证(PoC),避免重复的去github上找模型然后复现模型;能够帮助团队将功能进行流程拆解,很方便的提高分布式执行效率;能够有效减少代码冗余,减少不必要负担。

workflow的已经做好的轮子很多,例如perfectpolyaxondagster等。 之所以开发一个新的,主要原因是那些框架都太heavy了,对于大部分用户来说没法直接白嫖。

这个项目的核心目的就是能够减少大家的重复性开发,能够把绝大部分能够直接白嫖的东西放在框架里面,然后大家专注于自己的业务属性上,提升大家的工作效率。

特性

  1. 弹性伸缩:用户可以根据目前的请求量,自定义配置机器数。方便项目上量,并且保证服务器资源吃满(支持K8S)。
  2. 流程DAG:用户通过自定义自己的流程,框架支持DAG,保证流程的最高的并行度。
  3. 容灾能力强:集群中所有节点都是相同作用,不会因为部分节点挂掉而服务崩溃。
  4. 可扩展性强:框架主要是实现了一种设计模式,开发者只需要按照当前设计模式,扩展性无上限。
  5. 部署便捷:部署到上线不会超过5分钟(不考虑网速)。

依赖的第三方组件

  • rabbitmq:用于celery进行分布式的任务分发

  • triton:用于gpu端的模型服务的集中部署

  • milvus:用于特征向量搜索,存储【推荐有搜索需求的用户自行配置】

    如果觉得milvus太大,用户可以根据自己的自身情况直接使用faiss或者nmslib。并且自己实现对应helper。

框架中已集成的算法

更多开源模型欢迎在issue中补充,也十分欢迎您的PR。

人脸相关

OCR相关

  • DB 文本检测
  • CRNN 文本识别
  • 版式分析
  • 文本图像方向矫正
  • 文本方向检测
  • 常见扇形环形转换为矩形(针对于segmentation base的检测方案)

图像搜索

通用

  • NRIQA

官方已适配模型下载地址(不定时更新):

根据自己的需要下载模型,不用全部下载。

简单使用教程

  1. 克隆项目git clone https://github.com/novioleo/Savior.git到本地。或者下载release下面的source包。
  2. 启动rabbitmq,推荐使用docker启动:docker run --restart=always -d --hostname celery-broker --name celery-broker -p5672:5672 -p15672:15672 -e RABBITMQ_DEFAULT_USER=guest -e RABBITMQ_DEFAULT_PASS=guest rabbitmq:3-management
  3. 启动triton,推荐使用docker(需要安装nvidia-docker)启动:docker run --gpus=all --name=triton-server -p8000:8000 -p8001:8001 -v/path/to/your/model/repo/path:/models nvcr.io/nvidia/tritonserver:20.12-py3 tritonserver --model-repository=/models,其中/path/to/your/model/repo/path是网盘中triton文件夹下载的所在文件夹。
  4. 修改项目配置,进入Savior文件夹中,进入Deployment包中,复制server_config.py.template并重命名为server_config.py,修改里面triton、rabbitmq的配置。
  5. 配置python与安装依赖,通过控制台进入Savior文件夹中,创建环境:conda create -n SaviorEnv python=3.8,激活环境source activate SaviorEnv,安装依赖:python -m pip install nvidia-pyindex==1.0.6 && python -m pip install -r requirements.txt
  6. 启动ConsumerWorker,通过控制台进入Savior文件夹中,启动worker:celery -A Deployment.ConsumerWorker worker --loglevel=INFO,如果一切配置正确会显示已经成功加载Task。
  7. 启动DispatchServer,通过控制台进入Savior文件夹中,启动server:python Deployment/DispathServer.py,启动成功会看到端口信息等。
  8. 测试接口服务,推荐使用apifox进行接口调用测试,可以通过post请求测试ocr_interface/general_ocr接口,传入参数image_url,发送请求(第一次运行需要等待,模型需要预热,五次之后基本上时间会稳定),会得到一个OSS的路径,如果OSS使用的是Dummy(默认),则找到/tmp/DummyOSS-temp-directory/{bucket_name}/{path}对应的文件。

生产级使用教程点我

接口结果预览

OCR相关

自然场景下OCR

如何在自有项目下开发?

移步至:DevelopTutorial

感谢

感谢各位开源项目大佬的无私奉献。

Owner
Tao Luo
Algorithmer.
Tao Luo
Code repo for realtime multi-person pose estimation in CVPR'17 (Oral)

Realtime Multi-Person Pose Estimation By Zhe Cao, Tomas Simon, Shih-En Wei, Yaser Sheikh. Introduction Code repo for winning 2016 MSCOCO Keypoints Cha

Zhe Cao 4.9k Dec 31, 2022
An official source code for "Augmentation-Free Self-Supervised Learning on Graphs"

Augmentation-Free Self-Supervised Learning on Graphs An official source code for Augmentation-Free Self-Supervised Learning on Graphs paper, accepted

Namkyeong Lee 59 Dec 01, 2022
A PyTorch Implementation of Neural IMage Assessment

NIMA: Neural IMage Assessment This is a PyTorch implementation of the paper NIMA: Neural IMage Assessment (accepted at IEEE Transactions on Image Proc

yunxiaos 418 Dec 29, 2022
This repository contains the code for TACL2021 paper: SummaC: Re-Visiting NLI-based Models for Inconsistency Detection in Summarization

SummaC: Summary Consistency Detection This repository contains the code for TACL2021 paper: SummaC: Re-Visiting NLI-based Models for Inconsistency Det

Philippe Laban 24 Jan 03, 2023
PerfFuzz: Automatically Generate Pathological Inputs for C/C++ programs

PerfFuzz Performance problems in software can arise unexpectedly when programs are provided with inputs that exhibit pathological behavior. But how ca

Caroline Lemieux 125 Nov 18, 2022
Prototype for Baby Action Detection and Classification

Baby Action Detection Table of Contents About Install Run Predictions Demo About An attempt to harness the power of Deep Learning to come up with a so

Shreyas K 30 Dec 16, 2022
StarGAN - Official PyTorch Implementation (CVPR 2018)

StarGAN: Unified Generative Adversarial Networks for Multi-Domain Image-to-Image Translation

Yunjey Choi 5.1k Dec 30, 2022
CCPD: a diverse and well-annotated dataset for license plate detection and recognition

CCPD (Chinese City Parking Dataset, ECCV) UPdate on 10/03/2019. CCPD Dataset is now updated. We are confident that images in subsets of CCPD is much m

detectRecog 1.8k Dec 30, 2022
Lexical Substitution Framework

LexSubGen Lexical Substitution Framework This repository contains the code to reproduce the results from the paper: Arefyev Nikolay, Sheludko Boris, P

Samsung 37 Sep 15, 2022
The code of NeurIPS 2021 paper "Scalable Rule-Based Representation Learning for Interpretable Classification".

Rule-based Representation Learner This is a PyTorch implementation of Rule-based Representation Learner (RRL) as described in NeurIPS 2021 paper: Scal

Zhuo Wang 53 Dec 17, 2022
Pytorch Geometric Tutorials

Pytorch Geometric Tutorials

Antonio Longa 648 Jan 08, 2023
Code for the paper SphereRPN: Learning Spheres for High-Quality Region Proposals on 3D Point Clouds Object Detection, ICIP 2021.

SphereRPN Code for the paper SphereRPN: Learning Spheres for High-Quality Region Proposals on 3D Point Clouds Object Detection, ICIP 2021. Authors: Th

Thang Vu 15 Dec 02, 2022
This repo is customed for VisDrone.

Object Detection for VisDrone(无人机航拍图像目标检测) My environment 1、Windows10 (Linux available) 2、tensorflow = 1.12.0 3、python3.6 (anaconda) 4、cv2 5、ensemble

53 Jul 17, 2022
ByteTrack: Multi-Object Tracking by Associating Every Detection Box

ByteTrack ByteTrack is a simple, fast and strong multi-object tracker. ByteTrack: Multi-Object Tracking by Associating Every Detection Box Yifu Zhang,

Yifu Zhang 2.9k Jan 04, 2023
“袋鼯麻麻——智能购物平台”能够精准地定位识别每一个商品

“袋鼯麻麻——智能购物平台”能够精准地定位识别每一个商品,并且能够返回完整地购物清单及顾客应付的实际商品总价格,极大地降低零售行业实际运营过程中巨大的人力成本,提升零售行业无人化、自动化、智能化水平。

thomas-yanxin 192 Jan 05, 2023
Official PyTorch implementation of CAPTRA: CAtegory-level Pose Tracking for Rigid and Articulated Objects from Point Clouds

CAPTRA: CAtegory-level Pose Tracking for Rigid and Articulated Objects from Point Clouds Introduction This is the official PyTorch implementation of o

Yijia Weng 96 Dec 07, 2022
Implementation of the paper "Shapley Explanation Networks"

Shapley Explanation Networks Implementation of the paper "Shapley Explanation Networks" at ICLR 2021. Note that this repo heavily uses the experimenta

68 Dec 27, 2022
PyTorch implementation of the ExORL: Exploratory Data for Offline Reinforcement Learning

ExORL: Exploratory Data for Offline Reinforcement Learning This is an original PyTorch implementation of the ExORL framework from Don't Change the Alg

Denis Yarats 52 Jan 01, 2023
The code release of paper Low-Light Image Enhancement with Normalizing Flow

[AAAI 2022] Low-Light Image Enhancement with Normalizing Flow Paper | Project Page Low-Light Image Enhancement with Normalizing Flow Yufei Wang, Renji

Yufei Wang 176 Jan 06, 2023
Bottom-up attention model for image captioning and VQA, based on Faster R-CNN and Visual Genome

bottom-up-attention This code implements a bottom-up attention model, based on multi-gpu training of Faster R-CNN with ResNet-101, using object and at

Peter Anderson 1.3k Jan 09, 2023