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
Pixel-wise segmentation on VOC2012 dataset using pytorch.

PiWiSe Pixel-wise segmentation on the VOC2012 dataset using pytorch. FCN SegNet PSPNet UNet RefineNet For a more complete implementation of segmentati

Bodo Kaiser 378 Dec 30, 2022
Object detection, 3D detection, and pose estimation using center point detection:

Objects as Points Object detection, 3D detection, and pose estimation using center point detection: Objects as Points, Xingyi Zhou, Dequan Wang, Phili

Xingyi Zhou 6.7k Jan 03, 2023
This is the official code for the paper "Ad2Attack: Adaptive Adversarial Attack for Real-Time UAV Tracking".

Ad^2Attack:Adaptive Adversarial Attack on Real-Time UAV Tracking Demo video 📹 Our video on bilibili demonstrates the test results of Ad^2Attack on se

Intelligent Vision for Robotics in Complex Environment 10 Nov 07, 2022
Official Implementation for Fast Training of Neural Lumigraph Representations using Meta Learning.

Fast Training of Neural Lumigraph Representations using Meta Learning Project Page | Paper | Data Alexander W. Bergman, Petr Kellnhofer, Gordon Wetzst

Alex 39 Oct 08, 2022
A tutorial showing how to train, convert, and run TensorFlow Lite object detection models on Android devices, the Raspberry Pi, and more!

A tutorial showing how to train, convert, and run TensorFlow Lite object detection models on Android devices, the Raspberry Pi, and more!

Evan 1.3k Jan 02, 2023
A Light in the Dark: Deep Learning Practices for Industrial Computer Vision

A Light in the Dark: Deep Learning Practices for Industrial Computer Vision This is the repository for our Paper/Contribution to the WI2022 in Nürnber

Maximilian Harl 6 Jan 17, 2022
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network

Super Resolution Examples We run this script under TensorFlow 2.0 and the TensorLayer2.0+. For TensorLayer 1.4 version, please check release. 🚀 🚀 🚀

TensorLayer Community 2.9k Jan 08, 2023
Alpha-Zero - Telegram Group Manager Bot Written In Python Using Pyrogram

✨ Alpha Zero Bot ✨ Telegram Group Manager Bot + Userbot Written In Python Using

1 Feb 17, 2022
Line-level Handwritten Text Recognition (HTR) system implemented with TensorFlow.

Line-level Handwritten Text Recognition with TensorFlow This model is an extended version of the Simple HTR system implemented by @Harald Scheidl and

Hoàng Tùng Lâm (Linus) 72 May 07, 2022
Styleformer - Official Pytorch Implementation

Styleformer -- Official PyTorch implementation Styleformer: Transformer based Generative Adversarial Networks with Style Vector(https://arxiv.org/abs/

Jeeseung Park 159 Dec 12, 2022
Plug and play transformer you can find network structure and official complete code by clicking List

Plug-and-play Module Plug and play transformer you can find network structure and official complete code by clicking List The following is to quickly

8 Mar 27, 2022
Real-Time Semantic Segmentation in Mobile device

Real-Time Semantic Segmentation in Mobile device This project is an example project of semantic segmentation for mobile real-time app. The architectur

708 Jan 01, 2023
Video-face-extractor - Video face extractor with Python

Python face extractor Setup Create the srcvideos and faces directories Put your

2 Feb 03, 2022
Towards Boosting the Accuracy of Non-Latin Scene Text Recognition

Convolutional Recurrent Neural Network + CTCLoss | STAR-Net Code for paper "Towards Boosting the Accuracy of Non-Latin Scene Text Recognition" Depende

Sanjana Gunna 7 Aug 07, 2022
DCSAU-Net: A Deeper and More Compact Split-Attention U-Net for Medical Image Segmentation

DCSAU-Net: A Deeper and More Compact Split-Attention U-Net for Medical Image Segmentation By Qing Xu, Wenting Duan and Na He Requirements pytorch==1.1

Qing Xu 20 Dec 09, 2022
Trajectory Extraction of road users via Traffic Camera

Traffic Monitoring Citation The associated paper for this project will be published here as soon as possible. When using this software, please cite th

Julian Strosahl 14 Dec 17, 2022
DeepMetaHandles: Learning Deformation Meta-Handles of 3D Meshes with Biharmonic Coordinates

DeepMetaHandles (CVPR2021 Oral) [paper] [animations] DeepMetaHandles is a shape deformation technique. It learns a set of meta-handles for each given

Liu Minghua 73 Dec 15, 2022
Exadel CompreFace is a free and open-source face recognition GitHub project

Exadel CompreFace is a leading free and open-source face recognition system Exadel CompreFace is a free and open-source face recognition service that

Exadel 2.6k Jan 04, 2023
PyTorch implementation of EigenGAN

PyTorch Implementation of EigenGAN Train python train.py [image_folder_path] --name [experiment name] Test python test.py [ckpt path] --traverse FFH

62 Nov 12, 2022
Keyhole Imaging: Non-Line-of-Sight Imaging and Tracking of Moving Objects Along a Single Optical Path

Keyhole Imaging Code & Dataset Code associated with the paper "Keyhole Imaging: Non-Line-of-Sight Imaging and Tracking of Moving Objects Along a Singl

Stanford Computational Imaging Lab 20 Feb 03, 2022