AI, Google Coral: anyone? - Page 1
Forum section: electronics / general

author: DiTBho
author_rank: Super Contributor
timestamp: June 06, 2021, 05:35:58 pm
content: To tell it with humor:everyday, I wake up, and i know i need to find some new exploit to prevent spammers from delivering their spam messages to my letterboxeveryday, spammers wake up, and know they have to find new exploits to delivery their spam messages into my letterboxSo, every day, no matter if you are a sysadmin or a spammer, what really matters iswho thinks betterto win the game play... thinking about it differently ...short version. In order to improve my "anti-spam" mechanism, I am really tempted to buy a PCIe device that enables easy integration of two Edge TPUs into existing systems.I am currently *somehow* involved in a large project with four EdisonNX A.I. engines; unfortunately I am not involved in anything related to the A.I. programs my colleagues are developing with that beautiful but expensive piece of hardware. I am only the dude with the "sys-admin" hat over his head (D'oh).Google Coral seems one of the new brand name to look at, and there interesting products(1) available for the purchase. Testing boards, developing boards etc. Not so expensive, and they also seem extremely powerful.I see supported host OS areDebian LinuxandWindows10(I have both installed on my laptop), while the supported framework is exactly the one I mentioned above, just in a "lite" version: "TensorFlow Lite"So, what do you think?edit:(1) Google AI Coralproducts

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 06, 2021, 07:33:13 pm
content: What for?

author: DiTBho
author_rank: Super Contributor
timestamp: June 06, 2021, 07:56:01 pm
content: Quote from: SiliconWizard on June 06, 2021, 07:33:13 pmBetterspam detectionusingmodernmachine learning.Message classification { nasty/spam, good } by usingmodernmachine learning.Currently the symbolic manipulator used by my two A.I. bouncers strictly implements a subset of the English grammar, coupled with rules to classify a message as "nasty/spam" based on certain words/idiomatic expressions.So the two A.I. bouncers don't actually understand the meaning of the message. They simply behave as henchmen, and they are not able to learn anything. When a spammer finds a new message-pattern that somehow passes the spam-filter I have to manually add a new rule to cover it.I want to go from "symbolic manipulation" to "tensor flow", as written above, for me machine learning means I wouldn't no more have to manually write rules and rules set - how I do for years - but rather only train the A.I. to automatically understand what is "bad / spam" and what is "good" in a human contend called "natural language speaking" (NLP) so full of exceptions and more subjected to false positives and false negatives unless you spend a lot of effort with more detailed and complex rule-sets.

author: DiTBho
author_rank: Super Contributor
timestamp: June 06, 2021, 07:57:05 pm
content: Anyway, this topic is specific for AI, Google Coral products: anyone has experience with them?

author: tocsa120ls
author_rank: Regular Contributor
timestamp: June 07, 2021, 07:00:51 pm
content: Not yet but I have the 4G dev board up and running - not using the features yet, I just got it working from their somewhat vague description.

author: tszaboo
author_rank: Super Contributor
timestamp: June 08, 2021, 10:01:37 am
content: You dont want tensor for that. Tensor cores are good at computing lots of numbers, floating point 16 bit. GPUs are good at 32 bit floating point. Images and videos. Your input is none of those things, and you don't need continuous high speed processing on the incoming data. If your email is delayed by 2 seconds, I think you can live with it.Just use CPU, try to train it, and optimize it to hardware AFTER it works, not before.

author: DiTBho
author_rank: Super Contributor
timestamp: June 08, 2021, 11:52:39 am
content: Quote from: tszaboo on June 08, 2021, 10:01:37 amThat's adejà vuSome weeks ago a colleague said exactly the same thing -"You don't want tensor for that" - when we had to find an automatic way to find and eliminate unwanted sounds captured by online streaming.This scenario is simple: someone talks, a microphone records everything, including sounds like "umm" "ohh" "ehh" between words, plus other noises on the background, and you want to "purge" them in the final audio file.He had said - "they are sound samples, the tensor flow works on images! How can you use it with sound waves?!?" - so I replied - "suppose you have a way to transform the audio wave into a series of images to be shown to the AI, don't you think it will be work?" - but his next sharp answer freezed me to a full stop - "forget it, it won't work!", so I dropped everything.Then I found it by chance a similar project designed exactly as I imagined! Now I know it can be doneQuoteIt's not emails but rather messages in a letterbox. Kind of messages you can write in a blog as comment.Just to give you an idea about how the current engine worksCode:DiTBho # suppapurge-v2 data_average May1628 messages received in May, 2021966 messages automatically rejected as spam (59.3%)43 messages manually accepted as false negative183 messages manually dropped as false positive--------------------------------------------------------------------------522 messages archivedThe current engine is not efficient, and as you can see there are too many false positive cases. It's too permissive and making it more aggressive is not an easy task because I have to manually find patterns and write rules.I could evolve the current NLP core, but surely it would take a lot more effort than finding an appropriate model and parameters and training a neural network with data-sets, and I also have a feeling that it will be more adaptable to the spammer registry if they tried to find some trick to fool the anti-spam mechanism.

author: DiTBho
author_rank: Super Contributor
timestamp: June 08, 2021, 11:59:28 am
content: The idea behind "AI, Google Coral" is also about "tutorials".If these products are made for that purpose, they should have that kind of tutorialsBut I may be wrong

author: RoGeorge
author_rank: Super Contributor
timestamp: June 08, 2021, 01:06:10 pm
content: You don't need a devboard to learn AI, as long as you have access to a PC. Any decent graphic card in a PC would beat a small devboard any time no matter how well that devboard is praised by marketing fluffy words.Any small board or USB accelerator for AI is just a toy when compared to an ordinary desktop or laptop. Small hardware AI accelerators are good for very low power devices, but hardware AI accelerators have no magic dust, they are just doing matrix algebra. Any PC can do better, and the most advanced AI/ML (Artificial Intelligence / Machine Learning) software for PC is free, open source, and usually works on any OS, while software devboard support will be dropped in a couple of years at most.AI can sometimes help, but usually AI is unreliable and dumb. They have all the pitfalls we humans have: training a neural network is time/computationaly expensive, and inference (applying what it learned) is prone to mistakes. The only advantage is that once you trained a NN (Neural Network) on a powerful machine, then the inference is usually very cheap, for example a modest 100MHz single core microcontroller can do live face recognition from a webcam.Training is expensive, inference is cheap. Then, there are many NN typologies, each type with its own range of applications.- If you just want an AI based email spam filter, then just google about that, there is plenty of it already.- If you just want to learn AI in general, then search for AI/ML tutorials that arenottied to a specific hardware product.

author: rstofer
author_rank: Super Contributor
timestamp: June 08, 2021, 02:48:30 pm
content: The Google Coral seems like direct competition to the NVIDIA Jetson Nano. I haven't spent a lot of time looking but I wonder if the Coral has anywhere near the documentation of the Nano in terms of tutorials and sample code. NVIDIA is really into the AI thing (for some values of AI).I bought the 4 GB version from Mouser. I guess I'll have to start looking for tutorials...

author: rstofer
author_rank: Super Contributor
timestamp: June 08, 2021, 02:59:26 pm
content: Quote from: RoGeorge on June 08, 2021, 01:06:10 pmBut the CUDA units do matrix math a LOT faster even including the time for sending and receiving the matrix. There are many benchmarks that show this to be true. Here's a benchmark that shows over a 15x speedup. I know, there are benchmarks and then there is reality...https://wiki.tuflow.com/index.php?title=Hardware_Benchmarking_Topic_HPC_on_CPU_vs_GPUWe need to consider that at least one graphics card has over 10,000 CUDA units. That's a lot of horsepower and no CPU will ever keep up. Including transfer times...Then there is the Combined Memory concept which I don't really grasp just yet but the idea is that both the GPU and CPU have shared memory such that it is no longer necessary to export the matrix to the CUDA unit and import the results. I need to work on that a little more.NVIDIA is putting a LOT of money into AI (generically). They have training programs (fee based) as well as video tutorials that are free. I'm not sure what Google has...

author: rstofer
author_rank: Super Contributor
timestamp: June 08, 2021, 03:02:34 pm
content: For PC based AI of most any flavor, there are books available and plenty of Python code to play with. The information is all over the place. AI is becoming a commodity, not a specialty.I guess kids better pay attention in that Linear Algebra class. There's going to be a test later...

author: rstofer
author_rank: Super Contributor
timestamp: June 08, 2021, 04:23:41 pm
content: Quote from: evb149 on June 08, 2021, 03:23:04 pmAt least in terms of the Jetson Nano, I had no problems getting one. According to Mouser, they have 5 of the dev-board in stock and I ordered just one. We'll see if it actually ships. To be fair, I only ordered it an hour ago but it shows as "In Shipping" so that's nice.QuoteYes, I was. I just flunked terminology, again... Thanks for the links, they will provide a little light reading for later this morning.QuoteThe NVIDIA modified GCC compiler works well. Unfortunately, it seems they want to charge money for the Fortran compiler. Everybody knows that numerical analysis is best done in Fortran!QuoteWe live in interesting times! Who would have thought, back when I started with computers in 1970 (punched cards, etc) that we would be talking about teraflops as though they were just a number?The CDC 6400 got us to the Moon and back with 2 megaflops.

author: rstofer
author_rank: Super Contributor
timestamp: June 08, 2021, 05:01:25 pm
content: Amazon is another source for the Dev-Board and some accessories. I probably should have looked because Amazon is always faster than Mouser. Not that I'm in a hurry, I have other things to work on.

author: rstofer
author_rank: Super Contributor
timestamp: June 08, 2021, 06:52:32 pm
content: Quote from: evb149 on June 08, 2021, 06:09:13 pmI could just be flat out wrong! I was reading about the PGI compilers instead of trying the applications.I have installed the 'dlinano' image as it seemed to have the most features for the facial detection tutorials and, I believe, it is the incantation used in the 'for pay' program.There are at least 2 other incantations of the tools, I'll have to look around.I do have 'nvcc' but no 'nvfortran'.I bought a metal box to hold the Nano. That is a HUGE mistake and soon to be rectified. Sure, it's a nice way to mount the wifi antennas but there is no possible way on earth to interchange the microSD cards. More thought required!https://www.amazon.com/GeeekPi-Cooling-Control-Developer-Support/dp/B08D66VQ59I seems like there is just one toolchain for the Coral Dev Board and it gets copied to onboard flash. The microSD is not used for the filesystem. Hm...

author: RoGeorge
author_rank: Super Contributor
timestamp: June 08, 2021, 07:12:21 pm
content: If it were to say about boards, I've compared them a couple of months ago. By looking at the specs and the available reviews, nVidia Jetson nano (either 2 or 4 GB) seemed to be the winner, in both computing power and community support. For more money there is also Jetson Xavier. They are standalone single board computers (similar with a Raspberry Pi), but with an integrated nVidia graphic card in the same chip with the processor (like an Intel CPU with graphic card included on chip).Thought, recently the prices for Jetson on Arrow have doubled. Jetson nano 2GB used to be $55 (their goal was to be comparable in price with a RaspberryPI), and Jetson nano 4GB used to be $100, now they doubled. My best guess is this price doubling is related with the chip shortage of this particular times.I've just checked again the price for Jetson nano at Arrow, and the prices are back to normal. Probably what I've seen last weekend was just a listing price error.

author: DiTBho
author_rank: Super Contributor
timestamp: June 08, 2021, 07:18:16 pm
content: WOW, beautiful girl, extremely useful video

author: DiTBho
author_rank: Super Contributor
timestamp: June 08, 2021, 07:31:27 pm
content: Quote from: RoGeorge on June 08, 2021, 07:12:21 pmMy colleagues are playing with a Jetson XavierNX cluster. It's a nice metal box with a huge cooling fan on the top, and internally it has four Xavier boards inside. It's a bit expensive, paid 2800 USD. I know nothing, I am simply the system admin, so for my point of view they are four Linux nodes to be supported.Currently my blog runs on an embedded router connected to the internet. The previous version ran on an Linux / Apple MacMini G4 with only 512Mbyte of ram for Apache2, PHP, and everything. Funny, my super-router has more ram, cores and CPU-power, and expansions (2 miniPCIe) than the mac-miniI looked at the Google Coral for several reasons:First, because Google is using their TPU units for their own searching engine and products, so they already have strong experience and know/howSecond, because I do prefer a miniPCIe accelerator card, I'd like to use it with an embedding super-router Linux SBC.

author: janoc
author_rank: Super Contributor
timestamp: June 08, 2021, 08:21:07 pm
content: I wonder why you want to reinvent the wheel using TensorFlow and complex solution when this problem has a solution that works well for over 20 years now -https://spamassassin.apache.org/It is using a lot of carefully crafted (and constantly updated) rules in addition to Bayesian classifiers learning from your spam/ham patterns on the fly (unlike a "train-once and forget" Tensorflow model would). And can run on any old PC or even Raspberry Pi without the need for fancy machine learning hardware like the Jetson.Sure you can do it using neural networks - but do you want a solution that works today or do you want to tinker with shiny toys?

author: DiTBho
author_rank: Super Contributor
timestamp: June 08, 2021, 08:30:21 pm
content: Quote from: janoc on June 08, 2021, 08:21:07 pmBecause it doesn't work well with the kind of spammers who send smart-spam messages to my blogs.

author: janoc
author_rank: Super Contributor
timestamp: June 08, 2021, 08:42:37 pm
content: Quote from: DiTBho on June 08, 2021, 08:30:21 pmAnd did you actually try it or are you just conjecturing based on the poor performance of your hand-crafted system?

author: rstofer
author_rank: Super Contributor
timestamp: June 10, 2021, 05:48:15 pm
content: Quote from: rstofer on June 08, 2021, 05:01:25 pmMouser came through! I now have the Dev Board and it took about 2 days. Now all I need is time to play with it.

author: nctnico
author_rank: Super Contributor
timestamp: June 13, 2021, 12:48:04 am
content: Quote from: rstofer on June 08, 2021, 02:48:30 pmNo. Jetson Nano is a complete system on chip module. The Coral is just an accellerator. You can combine both though and use the Jetson Nano as a platform to use the Coral module.

author: rstofer
author_rank: Super Contributor
timestamp: June 13, 2021, 02:53:27 pm
content: Quote from: nctnico on June 13, 2021, 12:48:04 amThat ought to be fun! The Coral Camera showed up yesterday so I should be set to start.

author: DiTBho
author_rank: Super Contributor
timestamp: June 13, 2021, 07:27:24 pm
content: Bought a couple of new hardware toys. I will try with a different approach.

author: DiTBho
author_rank: Super Contributor
timestamp: June 14, 2021, 11:59:22 am
content: Yesterday I started adding new "Sentiment Analysis" modules. It's a supervised machine learning based approach with a classification model, which is trained using the pre-labeled dataset of positive, negative, and neutral to identify classes of given text.For each period, it uses, tokenization, lemmatization, part-of-speech-analysis, vocabulary and morphological analysis and a dataset to quantify messages content asopinionrequestsquanchand each of these category asnegativesomewhat negativeneutralsomewhat positivepositiveSquanch is a special class processed by a bag-of-words model. I don't know other ways of extracting features from the text. The Bow module converts text into the matrix of occurrence of { insults, dirty-speaking language, urban language } words within the message and it concerns about whether given words occurred or not in the message.All the new NLP modules are written in python + eRlang + php. The php code is just a wrapper between the HTML textarea where a guest sends a message, and the classification of his/her message: { message-dropped, message-dropped+user-banned, message-archived }.It's just a wild approximation, human communication is not limited to words, it is more than words, and "sentiments" are combination words, tone, and writing style.

author: RoGeorge
author_rank: Super Contributor
timestamp: June 14, 2021, 02:39:10 pm
content: As simple as it is from the AI/ML standpoint, that's one of the worst usage for AI.It is used to stifle free speech, shadow-ban users, promote mediocrity, and float atop only imbecile bloatware comments like "We need more like this".

author: DiTBho
author_rank: Super Contributor
timestamp: June 19, 2021, 09:55:46 am
content: Quote from: RoGeorge on June 14, 2021, 02:39:10 pmYou say this because you don't get spam, insults and harassment on a daily basis, I can assure you that when you get more gossip than useful messages then it's pretty demotivating.In my case, look at the percentageCode:DiTBho # suppapurge-v2 data_average May1628 messages received in May, 2021966 messages automatically rejected as spam (59.3%)43 messages manually accepted as false negative183 messages manually dropped as false positive--------------------------------------------------------------------------522 messages archiveddaily, 60% is spam! And this number tends to increase, more and more spam and less and less useful messages!Yesterday I got a call from DHL, they informed me that I have to pay 54 euros as import taxes for my Coral modules, I didn't ask any questions, I put more than 200 euros in this project, and I am happy that messages like thisQuoteWhat The Frog is this for?No matter, who cares, it will be automatically deletedYou mentioned "free speech"Quote from: RoGeorge on June 14, 2021, 02:39:10 pmWell, I can give you some examples of very received messages were "free speech" means there are mentally ill person on the web, and do you really want to allow them to smear the walls of your house with their mental garbage? Seriously?I don't want to give up, others can do whatever they want on their blogs/sites, personally Ineed more like this ML AI filter, and I don't think I am promoting any mediocrity!

author: RoGeorge
author_rank: Super Contributor
timestamp: June 19, 2021, 03:34:28 pm
content: My remark and annoyance regarding sentiment AI technology usage was not about you. It was about how sentiment analysis bots are used by major players like YouTube, Facebook, Twitter and alike.Congrats for making the Coral do a useful job.

author: John B
author_rank: Frequent Contributor
timestamp: March 13, 2025, 08:03:29 pm
content: Rather late to the party but anyways the support and ecosystem around these devices have probably come a long way.I've picked up a couple of these devices in Mini PCIe form. I'm experimenting with a networked video recording software project called Frigate. The Coral TPUs process motion detection and object detection in video camera feeds.This would replace an off-the-shelf NVR with a PC running Debian and a docker stack. You can also integrate the software with Home Assistant, or others with MQTT messages.https://frigate.video/Keep in mind the Coral comes in a few varieties: a USB device, an M.2 or Mini PCIe device. The latter being around 2x the speed of the USB devices, but they do require a driver. The USB version is also a lot more expensive, and hard to find, being out of stock (probably because it's the easiest to use out of the box, and works with Raspberry Pis). The M.2 and Mini PCIe versions are pretty cheap in comparison, and more widely available.The Coral website has instructions for installing the driver on Debian, which was very easy. The Mini PCIe needs an adapter to fit a regular sized PCIe slot, which ends up being a chunk of the total cost, but it may have the benefit of being able to bolt a heatsink easily to the TPU. The card is currently just flapping around in the PCIe slot, as I'm waiting for a low profile PCIe bracket with the right mounting points for the adapter before I bolt any heatsink mass to the adapter.I've only experimented with 1 USB camera at the moment, which only sees around 6% usage on the TPU, and a temp just under 50°C.