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
Implementing a simplified copy of Shazam application from scratch using MinHashing and LSH.

Building Shazam from scratch In this repository we tried to implement a simplified copy of the Shazam application able to tell you the name of a song

Arturo Ghinassi 0 Nov 17, 2022
OpenDILab Multi-Agent Environment

Go-Bigger: Multi-Agent Decision Intelligence Environment GoBigger Doc (中文版) Ongoing 2021.11.13 We are holding a competition —— Go-Bigger: Multi-Agent

OpenDILab 441 Jan 05, 2023
[CoRL 21'] TANDEM: Tracking and Dense Mapping in Real-time using Deep Multi-view Stereo

TANDEM: Tracking and Dense Mapping in Real-time using Deep Multi-view Stereo Lukas Koestler1*    Nan Yang1,2*,†    Niclas Zeller2,3    Daniel Cremers1

TUM Computer Vision Group 744 Jan 04, 2023
Efficient Lottery Ticket Finding: Less Data is More

The lottery ticket hypothesis (LTH) reveals the existence of winning tickets (sparse but critical subnetworks) for dense networks, that can be trained in isolation from random initialization to match

VITA 20 Sep 04, 2022
A Java implementation of the experiments for the paper "k-Center Clustering with Outliers in Sliding Windows"

OutliersSlidingWindows A Java implementation of the experiments for the paper "k-Center Clustering with Outliers in Sliding Windows" Dataset generatio

PaoloPellizzoni 0 Jan 05, 2022
[NeurIPS 2021] The PyTorch implementation of paper "Self-Supervised Learning Disentangled Group Representation as Feature"

IP-IRM [NeurIPS 2021] The PyTorch implementation of paper "Self-Supervised Learning Disentangled Group Representation as Feature". Codes will be relea

Wang Tan 67 Dec 24, 2022
Testing the Facial Emotion Recognition (FER) algorithm on animations

PegHeads-Tutorial-3 Testing the Facial Emotion Recognition (FER) algorithm on animations

PegHeads Inc 2 Jan 03, 2022
Stochastic Tensor Optimization for Robot Motion - A GPU Robot Motion Toolkit

STORM Stochastic Tensor Optimization for Robot Motion - A GPU Robot Motion Toolkit [Install Instructions] [Paper] [Website] This package contains code

NVIDIA Research Projects 101 Dec 12, 2022
(Preprint) Official PyTorch implementation of "How Do Vision Transformers Work?"

(Preprint) Official PyTorch implementation of "How Do Vision Transformers Work?"

xxxnell 656 Dec 30, 2022
imbalanced-DL: Deep Imbalanced Learning in Python

imbalanced-DL: Deep Imbalanced Learning in Python Overview imbalanced-DL (imported as imbalanceddl) is a Python package designed to make deep imbalanc

NTUCSIE CLLab 19 Dec 28, 2022
Auditing Black-Box Prediction Models for Data Minimization Compliance

Data-Minimization-Auditor An auditing tool for model-instability based data minimization that is introduced in "Auditing Black-Box Prediction Models f

Bashir Rastegarpanah 2 Mar 24, 2022
A simple Python configuration file operator.

A simple Python configuration file operator This project provides a common way to read configurations using config42. Installation It is possible to i

Scott Lau 2 Nov 08, 2021
HGCAE Pytorch implementation. CVPR2021 accepted.

Hyperbolic Graph Convolutional Auto-Encoders Accepted to CVPR2021 🎉 Official PyTorch code of Unsupervised Hyperbolic Representation Learning via Mess

Junho Cho 37 Nov 13, 2022
Keras implementation of AdaBound

AdaBound for Keras Keras port of AdaBound Optimizer for PyTorch, from the paper Adaptive Gradient Methods with Dynamic Bound of Learning Rate. Usage A

Somshubra Majumdar 132 Sep 23, 2022
Construct a neural network frame by Numpy

本项目的CSDN博客链接:https://blog.csdn.net/weixin_41578567/article/details/111482022 1. 概览 本项目主要用于神经网络的学习,通过基于numpy的实现,了解神经网络底层前向传播、反向传播以及各类优化器的原理。 该项目目前已实现的功

24 Jan 22, 2022
BalaGAN: Image Translation Between Imbalanced Domains via Cross-Modal Transfer

BalaGAN: Image Translation Between Imbalanced Domains via Cross-Modal Transfer Project Page | Paper | Video State-of-the-art image-to-image translatio

47 Dec 06, 2022
Isaac Gym Reinforcement Learning Environments

Isaac Gym Reinforcement Learning Environments

NVIDIA Omniverse 714 Jan 08, 2023
3D cascade RCNN for object detection on point cloud

3D Cascade RCNN This is the implementation of 3D Cascade RCNN: High Quality Object Detection in Point Clouds. We designed a 3D object detection model

Qi Cai 22 Dec 02, 2022
ONNX-GLPDepth - Python scripts for performing monocular depth estimation using the GLPDepth model in ONNX

ONNX-GLPDepth - Python scripts for performing monocular depth estimation using the GLPDepth model in ONNX

Ibai Gorordo 18 Nov 06, 2022
AnimationKit: AI Upscaling & Interpolation using Real-ESRGAN+RIFE

ALPHA 2.5: Frostbite Revival (Released 12/23/21) Changelog: [ UI ] Chained design. All steps link to one another! Use the master override toggles to s

87 Nov 16, 2022