Skip to content

Commit

Permalink
docs: improve README with introduction (#8)
Browse files Browse the repository at this point in the history
* feat: improve readme with introduction

* fix: yarn explanations

* refacto: doctr
  • Loading branch information
charlesmindee authored Nov 5, 2021
1 parent 47aed90 commit 0bdb6d6
Showing 1 changed file with 19 additions and 27 deletions.
46 changes: 19 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,37 @@
# Getting Started with Create React App
# Doctr Tensorflow.js demo

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:
This project is based on [docTR](https://github.com/mindee/doctr).
It provides a end-to-end OCR built and trained with docTR, deployed with Tensorflow.js.

### `yarn start`
You can choose between 2 detection models:
- `db_resnet50`, high-resolution (heavier but stronger)
- `db_mobilenet_v2`, medium-resolution, (lighter if your computer can't deal with the heavier backbone)

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The recognition model is the `crnn_vgg16_bn`.

The page will reload if you make edits.\
You will also see any lint errors in the console.
All documentation about models can be found [here](https://mindee.github.io/doctr/models.html).

### `yarn test`
Models were loaded and trained with doctr, then converted to Tensorflow.js savedmodels format
with the `tensorflowjs_converter`.

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
The segmentation postprocessing is performed with OpenCV.js

### `yarn build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
### Use the interface

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
You need to upload an image (top-left window), and it will automatically run the OCR on the document.
The segmentation heatmap will be displayed on the top-right window, the word-level boxes will be diplayed
on the bottom-left window and the words will be displayed on the bottom-right window.

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`
### Getting started

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
In the project directory, you can run: `yarn install` to install yarn, and then `yarn start`to launch the react app.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More
### Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

Expand Down

0 comments on commit 0bdb6d6

Please sign in to comment.