Coder Social home page Coder Social logo

goga1992 / torch2tensorrt-dynamic-craft-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from k9ele7en/torch2tensorrt-dynamic-craft-pytorch

0.0 0.0 0.0 25 KB

Convenient Convert CRAFT Text detection pretrain Pytorch model into TensorRT engine directly, without ONNX step between

License: MIT License

Python 100.00%

torch2tensorrt-dynamic-craft-pytorch's Introduction

Convert Pytorch pretrain -> TensoRT engine directly for CRAFT (Character-Region Awareness For Text detection)

Overview

Implementation of convenient converter from Pytorch to Tensor RT directly for CRAFT text detector. This repo is only about converting Pytorch model into Tensor RT. For Tensor RT inference, check out:

Author

k9ele7en. Give 1 star if you find some value in this repo.
Thank you.

License

[MIT License] A short, permissive software license. Basically, you can do whatever you want as long as you include the original copyright and license notice in any copy of the software/source.

Updates

7 Aug, 2021: Initial repo, converter run success.

Getting started

1. Install dependencies

Requirements

$ pip install -r requirements.txt

Install ONNX, TensorRT

Check details at ./README_Env.md

2. Download the trained models

Model name Used datasets Languages Purpose Model Link
General SynthText, IC13, IC17 Eng + MLT For general purpose Click
IC15 SynthText, IC15 Eng For IC15 only Click
LinkRefiner CTW1500 - Used with the General Model Click

3. Start converting Pytorch->TensorRT

$ cd converters
$ python torch2trt.py
INFO - Converting CRAFT Pytorch pth to TensorRT engine... (torch2trt.py:31)
...
INFO - Compare Pytorch output vs TensorRT engine output...
...
INFO - Convert CRAFT Pytorch pth to tensorRT engine sucess (torch2trt.py:83)

torch2tensorrt-dynamic-craft-pytorch's People

Contributors

k9ele7en avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.