RedenFlow

RedenFlow help

Putting a trained model on a Jetson or a Raspberry Pi

A trained model on your laptop is not much use to a production line. The Deploy wizard takes the model you just trained and writes out a folder that runs on the machine you name, reading from the camera you name, doing the job you pick.

You copy that folder across and run one file. There is no Docker image to build, no server to stand up, no Python environment to reason about and no notebook. This is the part most tools stop before.

The four questions it asks

Finish a training run and press Deploy. It asks four things and then writes the folder.

  1. 1

    Which model?

    Any run you have finished, including older ones.

  2. 2

    What should it do?

    Pick more than one if you want. There is also a minimum confidence, which is the level below which a detection is thrown away.

  3. 3

    Where do the pictures come from?

    A camera, a network address, a video file or a folder.

  4. 4

    Where will it run?

    This decides what goes in the folder and how the model is made fast.

Where it can run

A PC or industrial computer

Windows, macOS or Linux

Runs the model as it comes out of training. Nothing extra to build.

An NVIDIA Jetson

Orin, Xavier or Nano

A TensorRT engine is built on the device, which is the fastest it gets.

A Raspberry Pi

64-bit Raspberry Pi OS

Converted to NCNN on the device, a format built for ARM processors.

On a Jetson and on a Raspberry Pi the package carries a second script that builds the fast version of the model on the device, once, the first time you set it up. The reason is in the questions below.

What it can do

Show a live window

Watch it work as it runs.

Count what goes past

A running total, using object tracking so one thing is not counted twice.

Write to a spreadsheet

One row per detection, as CSV.

Save an annotated video

Keep a recording with the boxes drawn on.

Counting asks one more question: where the line goes. You drag it across a live frame from the camera, so you are drawing on the actual view rather than guessing at coordinates.

Where the pictures come from

  • A camera on this computerUSB or built-in
  • A network cameraAn RTSP address
  • A video fileRun it over a recording
  • A folder of picturesEverything in one place

What lands in the folder

Nothing is generated as a string of code for you to fix up. The program that runs is a real, tested file copied out of RedenFlow, and the configuration beside it is what your four answers produced.

run.pyThe program. Copied, never generated.
config.jsonYour four answers.
model.ptThe model you trained.
requirements.txtWhat it needs installed.
run.sh / run.batSo pip and virtual environments never come up.
README.md, GUIDE.txtWhat it is, and the steps in order.

On a Jetson there is also a jetson/ folder, and on a Raspberry Pi a raspberry_pi/ one, each with the script that builds the fast model and a README that goes first.

Questions people ask

Do I need to know Docker, or set up a server?

No. The wizard writes a folder. You copy it to the device, run one file, and it starts. There is a run.sh for Linux and a run.bat for Windows so that pip and virtual environments never come up.

Why is the fast version built on the device instead of on my computer?

A TensorRT engine is tied to the exact graphics chip, TensorRT version and CUDA version that produced it. One built on your desktop will not load on a Jetson. That is how TensorRT works rather than a limitation of RedenFlow, which is why the package carries a script that builds it there, once, on first setup.

Does the device need an internet connection?

Only for the first setup, to install what the package asks for. After that it runs on its own. RedenFlow does not phone home from a deployed package, and the package does not check a licence.

Can it read from a camera that is not plugged into the device?

Yes, if the camera speaks RTSP, which most network and IP cameras do. You give it the address and it connects. There is no support for camera vendors' own SDKs, so a camera that speaks only its manufacturer's protocol will not work.

What happens if the model sees nothing for hours?

Nothing. It keeps reading frames and reporting nothing, which is the correct answer. If you asked for a spreadsheet you get a file with no rows in it until something appears.

Something here not matching what you see? Write to us. A real person reads it.