Submitted by TaichiOfficial t3_zshrlv in MachineLearning

Intro & source code: https://github.com/houkensjtu/taichi-hackathon-akinasan

  1. The circuit of an ordinary RC toy car is modified so that Jetson Nano can control the movement of the car through GPIO port. Of course, we need to use motor drive controller here, because the upper limit of the output current of Jetson Nano is not enough to drive the car motor directly.
  2. The convolution neural network (CNN) is implemented using Taichi programming language.
  3. The road data was collected, then classified and labeled, and finally used in the training of CNN models.
  4. The pre-trained model is imported into Jetson Nano and the action prediction made for the images captured during driving.

Demo:

https://reddit.com/link/zshrlv/video/pcm3f6id3f7a1/player

124

Comments

You must log in or register to comment.

pm_me_your_pay_slips t1_j18nbyn wrote

You can do exactly the same with PyTorch, what’s gained by using Taichi here?

11

Just_CurioussSss t1_j18o3f8 wrote

Same question here (just curious, though). PyTorch mainly targets ML applications, while Taichi targets general high-performance numerical computation. Thus, PyTorch is mostly always the go-to option.

6

pigmentedink t1_j18pnv8 wrote

Look at OPs name

40

Just_CurioussSss t1_j18s7zt wrote

PyTorch and Taichi are not really competitors. Both can be combined to make some tasks simpler. (That's why I said I was curious)

9

houkensjtu t1_j1bjta9 wrote

You're right that Taichi is for general numerical computations. We just wanted to explore the possibility of making a CNN in Taichi - it's easier to do with Pytorch for sure, but I guess that kind of "uselessness" is part of the purpose of a "Hackathon" www

Also, check out this blog for more detailed comparison: https://docs.taichi-lang.org/blog/taichi_vs_torch_01

5

LoaderD t1_j19gjos wrote

Shot in the dark, but it looks like the project was for a Taichi Hackathon, so that probably played a large role in the software choice.

5

Different_Fig4002 t1_j18w5xi wrote

On a jetson nano? In this economy? Okay big spender.

9

FoxNSocks1 t1_j19qg7n wrote

What’s your go to then for a cheaper option? Pie’s coral’s they’re all $$$

1

Different_Fig4002 t1_j19qxwb wrote

Google's coral if you want TF or JAX otherwise Jetson but they are discontinued due to shortages... Nothing really similar to them.

1

MCPtz t1_j1a8leo wrote

In case you didn't watch the video, it's a self driving toy, the size of a standard remote control toy car, not a self driving car.

I was prepared to be impressed that something like a full sized car could be driven safely in an obstacle course off a nano...

8

Dry_Task4749 t1_j1etvxc wrote

Have you ever compared Taichi and Numba? Would really like to see how they compare, feature and performance-wise.

1

houkensjtu t1_j1gcwls wrote

I've done some comparisons before, and the conclusion is that it really depends on the computation task. Generally speaking, Numba on CPU is very similar to Taichi in terms of concepts and performance. Numba on GPU is more like writing CUDA, while Taichi allows you to use the same code for CPU & GPU.

You can refer to this repo for more detailed benchmark results: https://github.com/taichi-dev/taichi_benchmark/tree/main/suites

2

AllowFreeSpeech t1_j1gbxjx wrote

Numba is rubbish because they don't tell you how many unreasonable errors you will encounter using it (a lot) for anything that is not a very trivial function. That's despite reading its docs in detail. It is overrated.

1

AllowFreeSpeech t1_j1ofv9d wrote

What could possibly help general Taichi users is an easy way to convert a Pandas dataframe to a sensible Taichi structure. This is not easy, as Pandas has many different data types, but it still makes sense for Taichi to handle this conversion.

1

AllowFreeSpeech t1_j19jvmd wrote

In the repo, why are the code comments not consistently in English, e.g. in this file?

With taichi, is the backprop being done manually or automatically?

−1

houkensjtu t1_j1bl0my wrote

Everything related to CNN including the backprop was done manually. And we do have plan to update the documentation - sorry for the non-english code comments!

2

zadesawa t1_j1adug0 wrote

Maybe it’s supposed to be consistently in Chinese but because a lot of technical terms are borrowed from English it looks only sporadically Chinese?

1

thiru_2718 t1_j1c64vy wrote

Isn't it obvious? The code seems to be by a chinese hackathon team, why would you expect them to comment everything in English?

1

AllowFreeSpeech t1_j1dp8av wrote

Isn't it obvious? I expect what is shared on this subreddit to always consistently be in English. If you want to use other languages, don't post that shit here. This is not the place for it.

1

thiru_2718 t1_j1eme3a wrote

And with that one comment, you've confirmed that you're exactly as ignorant as I suspected you'd be. Thanks "AllowFreeSpeech", hope you enjoy your life policing the subreddit against the use of other languages in code comments...lol.

2

AllowFreeSpeech t1_j1et95s wrote

Free speech doesn't mean you can post nonsense or garbage or foreign-language materials. Free speech does still require you to be on-topic and stick to the language in use while in a public forum. Free speech means the freedom to post reasoned disagreeable opinions, but only those that are on-topic and are in the established language of the forum.

Use your head. If I go to a Chinese forum, and start posting in Japanese, how welcome would I be there...

2