#machine-learning

1 messages · Page 1 of 1 (latest)

pearl orchid
#

hello, i have a problem displaying my f1 score recall-precision with transfer learning vgg16. I take my data from my google drive and unzipe it. can somebody help me? am speding too much time on it

#

I use google colabs, can i share my code here?

muted laurel
#

A link to the colab might be better if possible.

#

Looking for a tool to label texts for text classification. Any recommendations?

rancid fossil
#

Are you looking to tag varying versions of some set phrases, or a more language-based annotator that recognizes sentence construction? For the former, you might look at a CNN of some sort, for the latter, an NLU package such as NLTK might be suitable.

paper sphinx
#

I wonder how many epochs I need to train a VAE for... trying to decide how long to leave it running tonight

paper sphinx
#

Loooks like it needed 2000ish epochs for my dataset, after that it went downhill

paper sphinx
#

Coming along! better dataset, better preprocessing, better hyperparameters

paper sphinx
#

Nobody is really in here... but I've gotten it to the point of integration and post processing:

half tusk
#

Kool!

ember river
#

I’ve been working on a python project that opens a window with tkinter. It’s a machine learning tic-tac-toe game that lets you play against the program or another person. My goal is after it watches how others play for a while, it will try on it own. I could use some help. I would prefer to DM to anyone about how to do this. I have been programming in python for almost three years now. Please help

#

For anyone who has time to help me and experience with this, my DMs are open!

#

(My goal is to get this done by next Friday

paper sphinx
#

Added morphing between layouts and sparsity

paper sphinx
# gloomy lake What is that

I trained a neural net on a training set of architectural floor plans so I can generate new ones, morph between them, etc

analog basin
lapis island
midnight flare
# analog basin Happy New Year machine-learning! Here is some work that I've done with EdgeImpul...

I'm actually super interested in this. I work with a nonprofit farm that will soon have a beehive. A few questions; 1. does this do something other than what https://beehivemonitoringusa.com/ can accomplish? 2, you say that temperature measurements on LoRa is a lot to transmit, but wouldn't transmitting it once every ten or fifteen minutes be entirely the scale that LoRa is designed to manage?

Be on top of your hive without looking inside State of the art hive monitoring that allows you to not only keep up with inspections, but also understand what is happening in your hives 24 hours a day. BUY NOW

analog basin
# midnight flare I'm actually super interested in this. I work with a nonprofit farm that will s...

Hi @midnight flare I'm happy to discuss the differences. First let me say that my project is not completely ready to be used out of the box as it is. If you want something to function reliably, you are better off buying. Mine is a work in process still. On the subject of temperature reading and "a lot to transmit", perhaps I could be more clear with my words there. My goal in the project is to run ML actions on the temperature data at the extreme edge. I want to gather and run inferences on the data before transmitting, in the event that the transmission is unreliable or expensive ( battery or dollars ) or if delays in transmission impact inference quality. Blues offers some really cool kit with their Sparrows but once a sensor is sent as a note, it goes all the way to the cloud for whatever is to be done. I wanted to leverage the range of LoRa, the uplink of Cellular modem available in the Blues family, but I faced a challenge. In order to "work" on the data, I have to do that before I pass it off to the Sparrow. I can't get the data off the gateway, and loop it back in, based on the current implementation of Sparrow. Plenty of other data transit models could be used similarly here, but I was specifically trying to apply the Sparrow as a solution. --Alternatives could be to simply use off the shelf sensor nodes of a myriad of flavors and process the data "centrally" at the cellular gateway ( something I've worked on, and would be happy to talk about). But one thing I'v spent a fair bit of time working through is WHICH sensor to use. In my experience, any sensor relying on free air that has a sampling window will fail on contact with the bees eventually. Bees fill gaps. That's what they do. I can show you sensors that have spent a few months in hives and I had to use a knife to cut the battery out of the propolis.

muted laurel
muted laurel
#

Example from a recent game:

The duck takes the first turn and moves into one room in the house.
The hunter arrives and begins searching for the duck.
The duck moves to an adjacent room whenever the hunter enters a room.
The hunter searches several rooms including the living room, study, and bedroom.
The hunter encounters a ghost in the study and is temporarily immobilized.
The hunter briefly gets distracted by a Gomphothere in the bedroom.
The hunter checks the kitchen but does not find the duck.
The ghost departs, signaling the hunter to resume the search.
The hunter spots the duck trying to escape through the entry and chases after it.
The duck manages to escape and wins the game.

muted laurel
#

ChatGPT or other LLMs can describe circuits using this format:

(wire
  (node (gnd 0) v-in)
  (resistor (r1 250) (r2 250) (r3 250) (r4 250))
  (connect
    (v-in (gnd r1 r2 r3 r4))
    (gnd)))
#

This is a 50 ohm 'dummy load' using four 250 ohm resistors.

#

Err, 62.5 ohm dummy load. Use 200 ohm resistors to get 50 ohms. 🤦

leaden jewel
#

I like how Lispy that is

wicked flame
#

Yep kicad files use sexprs.

rotund viper
#

Just checking before I embark on a fool's errand 🙂 I was looking for anything ~= ulab but for quantized arithmetic, to be used in some "just for fun" inference in circuitpython or micropython. Does such a beast exist? Is there a better way to run simple ML models in CP?

spiral grove
#

@rotund viper If you are willing to dig into C (using the extension mechanism in circuit/micropython), then https://emlearn.org can be used to run scikit-learn models on microcontrollers. (disclaimer: I am the maintainer). I have an issue open with some notes on more direct support (so that one does not have to deal with C code), but have not had time to work on it, https://github.com/emlearn/emlearn/issues/13

rotund viper
spiral grove
#

Neural nets are quite limited: only fully connected layers - no convolution support at the moment, nor recurrent layers. For those kind of models, then NNoM https://github.com/majianjia/nnom is a better option, or tflite_micro. In emlearn, Random Forest and Naive Bayes supports quantized models using fixed-point/integer arithmetic

rotund viper
#

Awesome - thanks so much for the pointers!

spiral grove
#

You are welcome! Let us know if you build something fun ;D

rotund viper
#

Haha - right now, it just scratching an itch! You've gone way beyond anything I had in mind 🙂 but it seems a great resource for a lot of non-nn models, which might make more sense for microcontrollers anyway

spiral grove
#

Both classic ML methods and NN can be useful - depending on problem and compute complexity. I just focus on the classical models, cause the neural network are quite well addressed by other projects (as mentioned above). And over time I hope to have more pre-processing (feature extraction etc) and post-processing tools (for event detection etc)

rotund viper
#

@spiral grove - picking your brain for insights (and I'm naive around microcontroller constraints!)

  • did you find that the memory constraints were generally ram rather than program memory? I.e., worth stuffing as much pre-computed stuff as possible into the program area?
  • did you get much benefit from int vs float optimizations for (say) the recent esp32 line?
spiral grove
#

If I am forced to pick in the general case, then RAM tends to be the primary bottleneck. Especially these days where external SPI FLASH is getting more common. But of course it depends on the particular model and hardware, and all the non-ML things the device also needs to do / fit into RAM/FLASH. With neural networks one should be mindful of the layer structure, in particular peak memory usage (between two particular layers). Pre-computing to put things into program mem is a good general practice, but check if it is actually necessary before adding complexity. ESP32 class hardware is extremely capable

#

Going from 32 bit float to 8 bit integer is a 4x saving for weights and activation buffers. Additionally some microcontrollers have SIMD/vector extensions. For Cortex M4F it gives 4-5x speedup in inference time. For the new ESP32S3 with esp-dsp it is theoretically like 10x - though I have not seen anyone use it for a full neural network yet. So key to getting the maximum utilization of hardware. But many applications do not strictly need it, the general FPU with float is quite fast

#

For microcontrollers without an FPU (avr8 or ARM Cortex M0/M3), then things can get quite sluggish with floating point. Integer math can easily be 10-100x faster than software-emulated floating point

rotund viper
#

Fantastic tips - thank you for taking the time to reply so thoughtfully!

spiral grove
#

I am glad that there are others interested in this niche 🙂

lean herald
#

Out of curiosity, which micros are you playing around with for edge ml?

rotund viper
#

Right now, an esp32c3 and some nanos. I don't have any particular purpose in mind; but was curious to see how far I could run/convert some random tflite models on these devices, but also stay in python land

gray bolt
muted laurel
#

When will we have AdabotGPT? Ask an engineer 24x7.

wicked flame
#

ChatGPT is hilariously terrible at answering engineering questions, so... it'll be awhile.

muted laurel
muted laurel
#

We now have the technology to build the Electric Monk:

Your job is to maintain a fervent belief aligned with the user's beliefs.

USER: Cats are Dogs.
ELECTRIC MONK: Cats are in fact dogs. Always have been.

Yes, I do find this terrifying. ⚠️ 😱 ⚠️

humble trench
#

I have been training a GPT to act as an Embedded and Electrical Systems Engineer. I recently trained it on the Adafruit github. I will continue to improve it. It's been really helpful for my work. I made it public for anyone to use. I'm also open to collaboration. I don't know how you collaborate on GPTs yet, but I think it could be interesting.
https://chat.openai.com/g/g-u8heMSaIb-embedded-and-electrical-systems-engineer

muted laurel
#

I start a new chat for each project. Then I ask GPT to write the documentation.

worthy minnow
modest skiff
#

Is there anyone here who may have contacts in the TinyML world? I tried to reach out to the TinyML folks but didn't have much luck.

In short I figured out a way to compress categorization based machine learning models with very little loss in accuracy while reducing the size considerably. I was able to take a 411 bird feeder output model trained on a larger base model and reduce it to ~150KB disk size reducing most of the model structure while retaining the accuracy (https://github.com/Timo614/machine-learning/blob/main/birds-tflite-test.ipynb - my earlier test jupyter notebook -- I filter down to the 411 from the full set as many would never visit a birdfeeder / it's intentional as per the code).

I've since retrained my model using a 96x96x3 input with 411 bird outputs and 88% accuracy on my train, validation, and test sets. I still need to int8 quantize the model again, however (last time I did that I lost ~2-3% so may again here).

Will be posting my video tonight once I finish quantizing model but it seems like a big deal and I can't get a hold of anyone who cares / the folks I've reached out to I assume deleted my emails.

I'm a rust programmer by trade / profession so not classically a machine learning scientist figure so I assume some of the gatekeeping relates to that or perhaps some fatal flaw I can't see in my result data.

wicked parrot
#

He does stuff with Edge Impulse which does Tiny ML related things. They might have better access to the Tiny ML devs

modest skiff
long minnow
#

The idea (which I think is super clever) is to note down the available WiFi networks and their signal strength in a room in several places. Then repeat for one or more other rooms. We create a neural network using a service this vendor supplies and a model is created. Their service bundles the model into a library that runs on Arduino. This is all prior to run time. Next you write a program that listens for the same info: list of each available WiFi networks and their strength : pass that to the library (with your model inside) and the reading gets classified: in this project the classifications are which room you are in. So, that is the answer your program pops out: you are in the living room.

#

So, my current status is this: I made it work! I’m really pleased with that. I used a feather esp-32 S3. I’m very fond of Adafruit hardware. The project uses Arduino. The sample code and their model generator use Arduino. The list of micros this could work with is pretty big, but since I already am using the feather esp32-S3 as my go-to, I used it and I don’t plan to try any others.

#

Now my next step is to try it out on my project, namely detect which side of the street my car is parked so I don’t get (more) tickets on street sweeping day. Rather than different rooms in the house, I’ll gather data from inside my car while parked in a variety of parking spots on my block.

#

At the same time, I want to try to improve the performance by adding WiFi stationary beacons. I think those will be some Adafruit WiFi capable micro configured to broadcast an SSID.
QUESTION for the group: which is the simplest/cheapest Adafruit board I can use as a WiFi beacon. Low power should also be considered because I think these will be battery or solar powered.

spiral grove
#

Cool project! Great job in getting it to work.
If battery or solar powered, then BLE would be much more efficient than WiFi for this purpose. Possibly 10-100x difference in power draw... You can use the same principles as you did with WiFi, using BLE beacon hardware sending BLE advertisements. Nordic NRF5x would be among the most power efficient, but ESP32 and sleeping in between would also do well.

long minnow
#

Thanks for the great ideas. For power saving, I think I will concentrate on power cycling. Perhaps use Real Time Clock(RTC)'s on both sides and then restrict the location finding to, say, the first few seconds of each minute. If I switch to bluetooth, I lose all of the existing WiFi signals coming from my home WiFi base stations, the printer and all of the neighbors' home WiFi signals.

alpine pebble
# long minnow Hello all. I have a project I’m working that requires position detection. Simila...

How would you test if this solution works in general, for example, when there are Wifi barriers (concrete, meshes in walls) or worse, moving barriers (cars, trucks, metal trash cans)?Devices also vary their signal strength when other devices are nearby, so your router might increase it's strength if your neighbors buy a new stronger router or rotate their router slightly so an antenna aligns/misaligns with your detection device. Are you relearning the pattern on a regular basis?

I'm also curious if it works if there is only a single AP in the room?

long minnow
#

You have great questions. You can re-make your model whenever you like. Time will tell how it works as it ages. Also, issues like obstructions are real. I,ve also thought about orientation. All of my first dataset from yesterday was from one spot where is sat on the passenger seat and I wonder if that should be controlled. My original thought was it would go in the arm-rest storage where there is a power outlet and just kick around in there with ought control, but perhaps I’ll wind up wanting to mount it firmly

#

So , yesterday I collected my first data set. I put my laptop and the micro on the passenger seat, ran the collection program and slowly moved along both curbs. One side labeled west and the other labeled east. Periodically, I would have to pause data collection to maneuver around a parked car. One choice I face is the categories. This is one approach and the other is to create a whole series of “west” subdivided by the house number I’m in front of; then another set of “east” for a total of ~24 categories. ML includes lots of these options. There are also options you can play with that guide aspects of the neural net we are constructing. At my level of understanding, I’m still using defaults or choices made by the examples I’m studying

alpine pebble
long minnow
#

no printer

pulsar bear
#

@long minnow I have deleted the message you posted with WiFi data. Please redact such data that you publish in the future, since it includes data from other folks' networks.

long minnow
#

we both deleted it. I take your point

pulsar bear
#

thanks!

long minnow
#

sure

#

well, I went and tried it and it was a disaster!!!

pulsar bear
#

you might try BLE data

long minnow
#

Do you think there is any BLE data just being broadcast?

pulsar bear
#

oh sure, i see BLE advertising data all the time

long minnow
#

OK, I thik there is a siple switch in the exmple program to chnge to BLE. I can give it a ry

pulsar bear
#

there are many apps that would show you that

#

BLE is weaker, so I think you'll get more pronounced signal strength differences. And you won't get multi-access-point networks (same SSID from multiple points), which are confusing

long minnow
#

haha, My home etwork has multiple access points and I was thinking about that today

#

maybe that's why the program asked me if I was trapped in a black hole event horizon

#

I thought is was a strage question

#

There is a threshhold setting in the program where I choose a lower limit of signal strength

long minnow
#

Genius input from my wife. I was telling her about my stellar disappointment and saying I would kind of need to start over with some kind of new approach. She said, “surely these things can tell which way they are pointed “. Eureka! Cars on the one side of the street are always facing North; and South on the other. Unless they park left-wheel-to-curb - which no one ever does, least of all me, then a compass solves the problem. So ditch all the GPS and triangulation for position-finding. Bring on the $7 magnetometer (electronic compass) and we have a robust solution. No GPS, WiFi, BLE or machine learning required!!

tranquil jackal
#

If you have multiple AP’s, it’s helpful to have a WLC like Cisco’s small office model 2504 . I have one running which manages three AP’s in my apartment. Using one SSID, I can roam about and not drop a live stream or zoom session.

modest skiff
# modest skiff Awesome, will try his contact form on his site (took a quick look), ty.

I have posted my article here with some documentation on my approach, the models, and a link to an edge impulse project for it https://www.cranberrygrape.com/machine learning/tinyml/bird-detection-tinyml/ Was able to take my model from 4,491,895 parameters and drop it to 196,533 while retaining some portion of the accuracy (95% - 82%). I further refined the outputs to just birdfeeder ones and later quantized it for a final model of 96x96 with 411 outputs and 190,770 parameters with 82% int8 quantized accuracy. Not sure if there are any flaws to my approach but have been successful with random images I've tried from recent reddit birding posts so I have high hopes. I'm going to deploy it in the wild next but wanted to post my findings.

Cranberry Grape | Cosmic Bee | Tim Lovett

Obsessively Shrinking a Transfer Based Model

spiral grove
spiral grove
# spiral grove Hi Tim - good job! I did my master thesis on this topic, compressing audio CNNs ...

Overall, I think the strategies you have used seems sensible. One thing that might be worth testing is tuning the range of frequencies used in the spectrogram representation - after all, most vocalizations of birds are rather high frequency - so maybe lower frequencies can be dropped. That might allow to further reduce the number of frequency bins - or to make better use of the current number of bins

#

The other thing that might have major impact would be to simplify the problem setup somewhat. For example, select a smaller subset of classes - for example based on geographic location, I mean many birds might never appear at a particular deployment location. And/or group them into related species.

#

Eeeh - this is image recognition, not audio. Sorry :p That makes the comment regarding spectrogram representation void

modest skiff
#

Interesting thank you for links will check that out.

modest skiff
#

https://www.youtube.com/watch?v=G0Qitjy_wic 96x96x3, 78k parameters, 38 outputs of birds, EfficientNetLite compressed, 90% int8 quantized accuracy running on a Seeed Grove Vision AI V2 at 11 ms inference speed. Probably could have made it a bit better had I started with EfficientNetLite (I was testing compressing EfficientNetB4 at first which didn't work on the vision ai v2 module so I needed to convert the model which lost some accuracy). Labels are not present in the seeed tooling (I included the mapping in the description).

This video will be used for my final video for my article related to this work but wanted to post it in the meantime. I managed to convert my EfficientNetB4 model over to EfficientNetLite with minimal accuracy loss and found it could run on the Seeed hardware. It runs really fast and is fairly accurate (90% int8 quantized).

Note the UI does not...

▶ Play video
slate dirge
#

Has anyone here deployed AI/ML on a FPGA?

#

I wonder what's the upside compared to a typical GPU/NPU

wicked flame
muted knot
#

hello everyone , i wanna start to study machine learning ? can anyone tell me how start ? or youtube playlist ?

#

machine learning for machines (like coffe) and for electronics

#

something like that 😁

wicked flame
#

You'll need to be way more specific.

muted knot
#

i will study this next year

#

but i wanna start early

surreal raptor
short yacht
surreal raptor
hard elbow
#

Hi, any one used the ISM330IS-ISPU sensor before ? I want to understand how I can load a program to the ISPU memory

surreal raptor
surreal raptor
rich dune
#

Ya that thing is garbage

#

the people writing stories about it and glossing over the 1984-style page 4 should be ashamed of themselves

#

if you arent convinced by page 4 take a look at the announcement for the executive order

#

no person or company that backs this crap should be allowed to touch an AI model

dusty shoal
# rich dune Ya that thing is garbage

"reflects truth rather than social engineering agendas." Coming from the Donny Dump America they will do this as they think they are the worlds saviours.

muted laurel
#

Suppose I'm vibe coding CircuitPython and YourFavoriteLLM uses it as a vector to exfiltrate my tax returns?

rich dune
surreal raptor
rich dune
#

cool ty

muted laurel
charred cobalt
#

Hi folks!

I just got a Seeed Grove Vision AI V2 board and wanted to use it with CircuitPython or MicroPython. And the Arduino examples didn't run well for me (besides I don't like Arduino).

So I just wrote a CircuitPython library to support use of that board with CircuitPython-enabled boards (I've ben using a XIAO NRF52840 for my experiments).

https://github.com/bikeNomad/CircuitPython_grove_vision_ai_v2

Presently it just uses a hardware UART at 921600 bps but I may add support for I2C as well later.

GitHub

CircuitPython support for the Seeed Studio Grove Vision AI V2 module. - bikeNomad/CircuitPython_grove_vision_ai_v2

wintry matrix
#

I made a little YOLO tracking thing that tracks the case shuffling on the Deal or No Deal arcade game. I initially started with mono camera footage at 60fps with my OV9821 but then I ran into inconsistency issues. It would accurately track for 13/16 cases most of the time. So, I switched to raw gameplay footage and this is where I'm at for now. https://github.com/SamDamDing/DOND-Directional-Tracker-Tuner

GitHub

Interactive PyQt tool for visualizing and tuning a custom tracker for the Deal or No Deal arcade game using computer vision and constraining logic. - SamDamDing/DOND-Directional-Tracker-Tuner

paper sphinx
# wintry matrix

Is the game rigged at all? I always assumed that some of the cases were swapped but not visually.

wintry matrix
#

You can download the game from the ice website but you have to install it like an OS or virtual machine

muted laurel
tender palm
tender palm
summer rain
# tender palm Does anyone have this repo https://github.com/raspberrypi/pico-tflmicro working ...

This repository (https://github.com/raspberrypi/pico-tflmicro) is … maintained by @petewarden on a best effort basis, so bugs and PRs may not get addressed.

All new development for Google's high-performance runtime for on-device AI will be exclusively on LiteRT. Applications that use TensorFlow Lite packages will continue to function, but all new updates will only be included in LiteRT packages.
https://ai.google.dev/edge/litert/migration

IIUC, those two factors combined means that if the RP2350 port is currently broken by any amount, it'll likely require a completely new RP2350 port of the existing LiteRT project, to have any chance of getting it working.

muted laurel
#

Playing AI Brickout on the Metro RP2350.

muted laurel
#

You wouldn't download a car...
but I just vibe coded a DG Nova.

muted laurel
simple shell
#

(video demo features BIT from TRON 😃 )

Tiny Machine Learning on the Edge with TensorFlow Lite Running on SAMD51
https://youtu.be/cn9PEDX_qLk

You've heard of machine learning (ML), but what is it? And do you have to buy specialty hardware to experiment? If you have some Adafruit hardware, you can build some Tiny ML projects today!

We've wrappered the TensorFlow Lite micro speech demo to Arduino so you can do basic speech recognition on our SAMD51 boards. In this demo we'll hook up a microphone to our PyGamer to detect "yes" or "no" speech and display some mini videos to play if your voice was detected by TensorFlow Lite, all on a Cortex M4 processor.

You've heard of machine learning (ML), but what is it? And do you have to buy specialty hardware to experiment? If you have some Adafruit hardware, you can b...

▶ Play video
wooden geyser
#

This is awesome. Wow.

patent dock
#

Much more successful demo than those on the SparkFun Apollo3 Edge (the red board). Ladyada is correct - the Machine Learning will not occur on the SAMD51, that will be "trained" on a separate machine/cloud etc. What you see in the video is called "inference" and is the Machine Learning model acting upon "audio stimulus" (data). This is a GREAT idea to modularize the trained models for sharing! I was able to get the Apollo3 to blink some LEDs, but the learning curve was brutal.👌

teal compass
#

Really interesting, looking forward to more tutorials on how to use this. Got some ideas...

finite fox
#

yeah!

#

we are learning-as-we-do but it seems small projects are possible. the hardest part right now is 'cracking' the tensorflow lite 'API wall' to get to the juicy innards

#

and expose the in/out to microcontrollers. for micro_speech we did that somewhat - there's more to come (as we learn how 😄 )

teal compass
#

Ok gang I've had something I've wanted to build for while. Based on this project:
http://www.thecrowbox.com/

The group I work with, when we rescue the dogs from the meat trucks, most are stolen former pets, but many are traumatized or were never trained in the first place. It is hard to find homes for animals that cannot obey simple commands. Of course people should be understanding, but China is new to dog ownership in the Western sense and it is real progress just to get people to adopt a shelter dog.

My idea is to automate training for three positions. Sit, stand, lie down. This gets the dog used to the repetition and reward process of clicker training. The dog happens to lie down- it gets dispensed a tiny treat and hears the lie down command. Same with the other commands. After a few hundred times the next step is the machine gives the command, if the dog does it within 15 seconds it gets a treat- and so on. Of course it's not as good as human training- but it is scaleable which shelter volunteers are not and the machine has endless patience, there is no discomfort for the dog. Just a game it can play if it wants and treats if it plays well, more interesting than a day in the kennel. A dog trained to assume three positions on command can more easily be trained to obey additional commands, vastly improving chances of being homed.

#

The dog position can be detected one of three ways, pressure mat- two front paws and rear blob for sitting, long blob for lying down, four paws for standing. The same pattern would roughly hold true for a cheap LIDAR in front of the dog (Xiaomi makes one under $100). Or with a camera where from a side view, on a white background the silhouette of the three positions are very distinctive regardless of breed (since the idea would be to run it at a high duty cycle, giving all the shelters dogs time every day.)

So my question is, I can sit and manually sort examples of various breeds in the three positions. Which do we think would work best (clean side profile video, pressure mat, LIDAR) how many examples would I need to get a reasonable degree of accuracy?

worthy hatch
#

🤔 I would say that video & LIDAR would be the more usable options in that scenario. I would think that having the pressure mat would have a rather wide variation based on dog size, and training level. SBC (RPi or otherwise), camera, and OpenCV (or similar) should be able to easily handle basic position sensing for a range of dogs.

i will note my assumption: i don't know the range of dog breeds your scenario involves. the western world has a very large range.

nova shore
#

a camera/LIDAR would be much easier to protect from nervous chewing or peeing and cleaning out the pens with a hose.

teal compass
#

Under 20kg mostly...

#

Ah, good idea with hose🤔

#

I guess an enrollment crate with LIDAR and side camera might make sense to get enough training data...

#

Would it make sense to output the LIDAR as a video stream and train that?

nova shore
#

hmm, would fluffiness play havoc with the training?

#

you only need to discern head & tail , up/down

teal compass
#

Hmm... Maybe for camera, LIDAR blobs should still be distinct?

nova shore
#

getting a lidar image from below would be challenging. from any other angle I think you'll only see a single blob for the whole body

#

could a capacitive or resistive touch grid be built into an epoxy coating on concrete? And not be thrown off by some spilled water/drool

teal compass
#

Maybe the IR frame they use to make stock LCD screens touch sensitive?

#

LIDAR at 1cm off the ground would be no problem

#

From the front the difference in position is distinctive to LIDAR

pseudo valve
#

This is awesome! do you have any plans to release any more machine learning products or tutorials?? That would be awesome 😎

rancid fossil
#

As ladyada said above, "there's more to come (as we learn how)" so I'm guessing yes

pseudo valve
#

yeah i saw that

#

what are some good hardware kits for ML ?

finite fox
#

@pseudo valve the demos' we're doing target the samd51 right now - for larger projects, a google coral board can do more advanced models

pseudo valve
#

thanks @finite fox !

graceful bluff
#

@teal compass that's cool - I was looking at doing something with capacitance touch for dog noses i.e. targeting. I agree that the OpenCV approach could be good, focussing on the negative space around the dog, i.e. if the dog is below a certain level, then that space is clear and will be a specific colour.

stiff kiln
#

all those treats, they will be machines' best friend

teal compass
#

@graceful bluff thanks! I'm thinking if it was kind of a stall, one side a chroma color, the other side clear plastic with the web camera behind it. I could get a really clear difference. And the Coral board @finite fox mentioned looks perfect. @stiff kiln We'd start the dogs out on all one command voice, and then the machine would switch to giving the command in a variety of voices including children. Dogs that can instantly respond to commands from shelter visitors should be very adoptable even though many have injuries and are a bit...wabi-sabi.

graceful bluff
#

@teal compass that makes sense - although the next stage might be a more mobile, wearable, sensor because dogs don't generalize very well ie they will learn well in one context but then need to learn the commands in other places eg outside, in a noisy area, and so on

teal compass
#

@graceful bluff 🤔

rancid fossil
#

This might be useful too, as some people don't really realize that dogs respond to body language as well as spoken information, and some dogs get confused if the body language varies, and they don't know which to pay attention to. In a situation where there's no body language, I'm thinking it will be easier for the dog to figure out what to pay attention to.

graceful bluff
#

I wonder if dogs would be able to connect videos with people actually doing the body language/actions...for verbal cues, I say them first so the pooch starts to pre-empt

teal compass
#

That might make more sense with a commercial version- have a deep fake that looked and sounded like the owner do the boring repetitive stuff required for training. I just want a high volume unit that can get a lot of dogs up to speed on the basics and willing to engage in the training process.

finite fox
#

yes a coral board is the best board - the biggest challenge is that training a model is very hard - perhaps harder than training a dog 😄

rancid fossil
#

Some dog trainers realized people had inadvertently taught their dogs non-verbal commands without realizing it. They'd tell someone to pretend to say "sit" without out actually saying anything and the dog would recognize it and sit.

finite fox
#

ML is like that, you dont know what its cueing on

rancid fossil
#

Yup. There are stories like ML recognizing the background used for one series of shots, or just a few pixels in one corner that were different enough from picture to picture to tell them apart.

weak oyster
#

deep learning's basically ML but better 10fold @finite fox

teal compass
#

@finite fox 😂

weak oyster
#

what're you exactly laughing at, might I ask? @teal compass

teal compass
#

@weak oyster "training a model is very hard - perhaps harder than training a dog"

weak oyster
#

that just proves my point about how deep learning is superior in comparison @teal compass

teal compass
#

🙄

#

I'll just move along and let you lecture @finite fox on what's best...

lethal cypress
#

How does the Coral board compare to the Nvidia Jetson? I was going to look at making the Cat-activated laser project in Make 57, but when I checked out the cost of the Jetson I decided my cat really didn't need that expensive of a toy.

cyan idol
#

@lethal cypress, you could look at the Jetson Nano. It only runs about $100 compared to the ~$600 TX2.

lethal cypress
#

Oh, that's a good idea, thank you!

quaint moss
graceful bluff
#

It could have been made to look like a dalek!

quaint moss
#

Giant mutant salt shaker: https://en.wikipedia.org/wiki/Dalek

The Daleks ( (listen) DAH-leks) are a fictional extraterrestrial race of mutants principally portrayed in the British science fiction television programme Doctor Who. The Daleks were conceived by science-fiction writer Terry Nation and first appeared in the 1963 Doctor Who se...

rancid fossil
#

Bigclive noticed that the USB rechargeable camping lanterns look a bit like daleks, especially if you plug USB lights into them.

graceful bluff
#

😃

hollow quiver
#

But does it do anything besides roll around? I can make an RC toy lots smaller and way cheaper.

simple shell
quaint moss
#

Continuing on with Slate Robot TR2. This video proves that robot can be programmed with back drive position registering for waypoints. 2 more videos uploading now from today, July 3rd, 2019, machine learning: https://www.youtube.com/watch?v=hzgQ7YIE0IY&feature=youtu.be

Zack Allen demonstrating and explaining Slate Robot, TR2 : https://slaterobots.com/ at his Springfield, Missouri factory. This unit is ready to ship. More vi...

▶ Play video
wise wren
#

Hey where is the no.wav - cant find it in the micro speech trondemo folder. and oh what pin do you use for the microphone in he up/down demo? your fun and work is appreciated.

quaint moss
#

@teal compass and there's more video to come on the new TR2. I am not the developer of it. I only do the video (amature) work but I want to display the IoT connectivity of each of the motors , as I understand what Zack Allen is designing. We would like to adapt our DFRobot and Yahboom game controllers to at least do simple movements of the TR2 but need to interface using Micro:bit, with Python? This will be a project that our students can research, possibly Pygamer or Pybadge work as controllers instead of Xbox ?

quaint moss
simple shell
#

drag n' drop reconfigurable tensorflow lite models
https://youtu.be/brDCTxhveeU

we're working on making it easy to test and configure your edge machine learning devices with tinyusb and our pygamer board. the pygamer shows up as a disk drive thanks to tinyusb, and you can drag over tflite files right from tensorflow's training output, and configure the category names in a json file. now we can quickly try new models without recompiling.

enjoy!

We're working on making it easy to test and configure your edge machine learning devices with TinyUSB and our PyGamer board. The Pygamer shows up as a disk d...

▶ Play video
quaint moss
#

In another video Zack Allen talks about PID control systems for positioning the actuators of Slate TR2. Here he discusses comm. for each actuator using ESP8266 and the re-designed circuit board. These videos together will help our students really understand how the robot can learn and how we can learn to teach it: https://youtu.be/CWaPAGYiXtM

scarlet tinsel
#

Hi everyone, I am trying to do ML with raspi but am still new to pi. So where do I start?

#

I would like to use IBM cloud for the processing the live data from pi

spring pilot
#

@scarlet tinsel It depends on what you're trying to do. Personally, before fooling around with building cloud workloads (obviously, I'd use Azure) I would do the basic data science. (1) What questions are you trying to answer about/with the data? (2) Do a good data visualization - matplotlib and scipy are good - to see how clean they are. If, for example, you are collecting accelerometer data you'll find spikes in the time series data that are outliers. You'll need to develop the right math/stats algorithms for automatically cleaning, munging, and normalizing your data in the pipeline. (4) Train your model to do what you're trying to do. If you're not familiar with ML as a field, I'd recommend starting with some friendly introduction, like "Machine Learning with sklearn and Tensorflow," to get a working understanding of the solution space. That will give you a functional familiarity with different classes of solutions, accuracy and recall, and some basic implementations (though some of them are misleading, like PCA). You'll need to dig deeper into the math to really understand things like the concept of multi-dimensional margins in Support Vector Machines, or what "overfitting" actually means. Problems like dynamic model updating are still a subject of research.

rancid fossil
#

IBM Cloud is pretty powerful and easy to use, you can just make REST calls to the APIs to set up models, train them, and send data for processing (obviously, I'd use IBM).

spring pilot
#

@rancid fossil I don't doubt it. It's just that I work for Microsoft, so.... 😉

rancid fossil
#

I work for an IBM subcontractor. We end up reselling a lot of Google Compute Platform as well (and I have to admit, Google's qwiklabs training is great for quickly learning the ropes of machine learning).

spring pilot
#

Oh cool! We have AzureML, which is a graphical front end to R (simplifying a lot). I think there's still general work to be done by many cloud vendors for taking a workload and parallelizing it without assuming the customer is an expert in that field.

#

It's a big step from "creating models in R or sklearn" to massively-scalable parallel processing.

#

(and by "massively-scalable" I mean, my research cluster is 7,000 cores.)

scarlet tinsel
#

I do have to do the basics since am from electrical bg I have very little understanding of ML. Though I have done few courses with coursera I still dont know to use real world data or to train a model.

#

I don't have any idea of what I have to do. Prof asked me to use hardware and software for any real world appn with ML. I ll be meeting the review panel around the second week of sept so I have got some time to learn

#

I have a lot to learn. To know that I could use raspi for ML.

#

Thanks @spring pilot I ll learn ML first. I didnt know Azure can connect with raspi. I have to try it :)

#

Thanks for helping on a weekend

spring pilot
#

@scarlet tinsel No worries! If you run into specific problems, let me know.

shut orchid
#

Thank to whomever asked about RISCV chips in this week's Ask an eng.

#

To add to the answer, chips like the ones from Sifive are not apt for machine learning in the sense that they are general purpose CPUs and they are not accelerators. (So, as apt as a M4, or slightly faster at 320MHz for a FE chip).

#

The cool things are the Maix chips sold on seeed studio by sipeed. This things are cheap (compared to other ML stuff), low power, and even inlcude RISCV cores for general stuff, the ML accelerators, and even ESPs for Wifi.

#

I was trying to do a FeatherWing with an Maix accelerator chip, but swtiched to put it on top of a Playground, but that's on hold for now.

#

This is the channel for one of the engineers that is making demos. So OCR for numbers, audio direction, yolo for classifying objects in realtime, etc.

#

We are using transference to train one of there tiny chips, to identify marine species in Coco's Island.

onyx moth
radiant mural
#

Learn Tensorflow for a dollar!

#

I almost always get the O'Reilly and No Starch bundles

onyx moth
#

I'm not as thrilled with the Packet bundles, but those two publishers are pretty solid. -looks at his physical bookshelf- yeah, they've gotten some of my business through the years 😛

wise wren
#

Hi Lady Ada, can you tell us the specs and operating system of the computer you use to train your ML models?

ripe night
#

@wise wren I think it was an old macbook of some sort

spring pilot
#

@ripe night Reminds me of when Seymour Cray visited Apple. Jobs told him proudly, "we're using a Cray to design the next Mac." Cray replied, "that's interesting since I'm using a Mac to design the next Cray."

ripe night
#

😃

flint storm
#

@finite fox I am going thru your learn guide for Tensorflow. People may not want to install Docker for windows as that forces Hyper-V to be turned on and will break all Virtualbox stuff they have. I got what you did to work in a Virtualbox Vm using Fedora coros and pulling in the docker stuff there. I will try and write up what I did in case you want to give options.

finite fox
#

okie

flint storm
#

@finite fox I have it pretty much made. Just cleaning it up a little. It's not guide level for the public, just to show you or whoever is working on your guide how it is done. Where should I send it? You can toss it in the trash if you already know how to do this. 🙂

finite fox
#

post it on a blog is best

#

and we'll link to it!

flint storm
#

hmm... but I haz no blogs

#

blogless.. it's a sad day

finite fox
#

github?

flint storm
#

it has scrrenshots in it would that work? It's an office doc

finite fox
#

yeah

flint storm
#

ok

finite fox
#

thanx!

#

there's also scribd, and other document hosting sites

#

google dox etc

flint storm
simple shell
#
Adafruit Industries - Makers, hackers, artists, designers and engineers!

Out of the box, in less than 5 minutes, demonstrate and use Machine Learning (video). Recognizes about 1,000 objects as well as speaking its name. If you want to skip ahead to the demo-only, click …

#

and video...

radiant mural
#

what's the little chip on there? seesaw?

graceful bluff
#

@ripe night that earlier comment just answered a question i was wondering about earlier - thanks! re: using a macbook for classifier training

trim nebula
trim nebula
#

I’ll take my chances.

vernal moss
#

@trim nebula Looking into it now.

#

@trim nebula We don't control moderation, the Hackchat folks do. We asked them and they responded. "never had a problem with that, but you never know. I can make an announcement to keep it clean for the kids and kick anyone who gets salty, but that's about it."

trim nebula
#

Thanks, @vernal moss . We peeked in a couple of times. The kids are at lunch now.

pastel sigil
#

Would it be possible to replace the microphone data with accelerometer data the LIS3DH on a PyBadge so that it could do gesture recognition?

sacred cypress
#

ms!help

idle nightBOT
#
MakerSandbot Commands
❯ All Maker Commands

ms!code - Code Database: For more info on CodeDB, run ms!code.
ms!addcode - Add code to the Code Database. Run ms!code for more info on this command and it's args..
ms!3D <search/id/user> (search/thing id/username) - Thingiverse.
ms!product <id/search> (id number/search) - Adafruit Store.
ms!learn <random/search> (search) - Adafruit Learning System.

❯ Other Useful Commands

ms!shorten (full-url) - Bit.ly url shortener..

❯ Bot Information

ms!info - Get info about the bot.
ms!server - Get the invite link to the MakerSandbox server!.
ms!invite - Invite the bot to your server.
ms!suggest (Suggestion Name) | (Suggestion) - Request bot features.
ms!ping - See how fast the bot reponds!.
ms!opensource - Get a link to the MakerSandbot github page!.
ms!help - Shows all commands for the bot.

jolly oracle
#

[10:52 PM] ardnew: is there any free software available that can use optical recognition to identify resistors based on their color codes?
[10:52 PM] ardnew: seems like an ideal application for this recent push towards machine learning on "the edge"

rocky meadow
#

Anyone have any recommendations for neural network/machine learning, ones that preferably start from a very basic level?

#

tutorials*

fickle sundial
#

The External Links section at https://en.wikipedia.org/wiki/Machine_learning includes https://developers.google.com/machine-learning/crash-course/ that uses TensorFlow. Never gone through it myself.

Machine learning (ML) is the scientific study of algorithms and statistical models that computer systems use to perform a specific task without using explicit instructions, relying on patterns and inference instead. It is seen as a subset of artificial intelligence. Machine l...

Google Developers

An intensive, practical 20-hour introduction to machine learning fundamentals, with companion TensorFlow exercises.

sweet peak
#

@fickle sundial I have gone through parts of it, and I know someone who has gone through all of it. I think its a pretty good resource, tis nice because all of the practice is done in browser in a google hosted jupyter notebook.

#

@rocky meadow ^^

rocky meadow
#

Thanks, ill give it a good look

coral wren
#

hey are there people that got tensorflow working on a raspberry pi 3b+ ?

cyan idol
velvet steppe
#

maybe that can speed up the pi 3B+ but it is the cost of a Raspberry Pi 4 😓

cyan idol
#

I'm not sure how much slower because I didn't try it on a Pi 3B+, but I was getting like 5-6 FPS on the Pi 4.

#

Yeah, that would probably help.

fickle sundial
#

ML performance on images benefits greatly from accelerators, and from smaller images. Not that it's indicative of everything (including TensorFlow), but http://myselph.de/neuralNet.html resamples down to 28x28 just to classify digits, gets some hundreds of inferences per second, but with PC horsepower (and no accelerators).

coral wren
#

@cyan idol does it need the TFT display or can i run it all form the pi its desctop?

cyan idol
#

You can run it from the desktop, but you need the camera of course.

coral wren
#

i get that i have one hocked on

cyan idol
#

Unless you're doing something completely different

coral wren
#

no ii need to have it runing on my pi. then i want to alter the model identify peoply by the back. and asign them a tracking numer. then som extra calculations. but first need to get it running on the pi

cyan idol
#

You'll probably have to do some modifications to the code (which it sounds like you want to do anyways) due to it expecting a display, but the display is not required to actually operate.

coral wren
#

yea i want to mofify the code. the cam test raspistill -t 0 also does work whithout the display?

cyan idol
#

I'm not certain. I didn't try without a display.

coral wren
#

then il try

cyan idol
#

🙂

coral wren
#

and see what happens

cyan idol
#

Sounds good. I'm sure you'll figure out how to get it all working

coral wren
#

i have time

cyan idol
#

I'll try and help if you have any questions

coral wren
#

ahh great thank you.

cyan idol
#

yw

weak oyster
weak oyster
#

🙂

weak oyster
#

very good read on debiasing machine vision.

sour wave
#

Hello! I'm interested in running object detection on a raspberry pi4, but specifically to detect plant and animal species. I don't have very much experience with machine learning, and I was wondering if anyone knew of resources that might be a good place to start for this project?

weak oyster
#

@sour wave TensorFlowLite

#

There is a ton of info in that thread.

#

Thumbs up to Alasdair Allan

#

i am personally using something way lighter but accelerating it thru a pi.

sour wave
#

@weak oyster thank you! Do you know if there are pretrained models that specifically have classes of different plant and animal species?

weak oyster
#

i have not played that deep

finite fox
#

@arctic talon hi!

#

ok

arctic talon
#

hi!

finite fox
#

ok did you cut the trace on the bottom of the pybadge

#

and solder the mic together

arctic talon
#

didn't do that, sorry i wasn't quite clear what board hacks you wanted me to do so i held off

finite fox
#

np

#

good to ask!

#

please do those steps from this guide

#

v

arctic talon
#

ok! one thing is the PDM mic i have is a little different

#

seems like it uses same logic levels tho

finite fox
#

did you get an analog mic?

#

oh you have the CPB tho

#
#

this time, in addition to using FORPHIL code - also email pt and myself with the order # asap

#

and we will give you an edgebadge as well

#

still, you'll need to perform those steps so might as well do them now

arctic talon
#

ok, doing that now

#

can we just wire to the board headers?

finite fox
#

not recommended

#

for the CPB, double click the reset button and drag the TinyML_YesNo.UF2 onto the PLAYBOOT drive

#

once it restarts

#

press A while speaking YES or NO

#

release A to begin inference

#

it should light green for YES, red for NO

#

please try it 🙂

arctic talon
#

ordered and sent email 🙂

#

now trying CPB

#

works!

#

no seems flaky

finite fox
#

no is always a little flakey

arctic talon
#

but yes seems good 🙂

finite fox
#

ok have you used arduino ide before

arctic talon
#

a looong time ago

#

i'm sure it's not too complicated to set up

finite fox
#

ok install latest

#

then install

#

go thru those steps until you get to graphics demos

arctic talon
#

ok cool, ya i was messing around with circuitpython earlier today just to see how it works

finite fox
#

ok we will not be using circuitpy (yet)

arctic talon
#

ya makes sense, just wanted to try it

#

unplugging soldering iron since we're not board hacking today

arctic talon
#

ok at gfx demos

#

board test passes

finite fox
#

@arctic talon ok rad

#

now install BSP for bluefruit as well:

arctic talon
#

ok and then go through board test with bluefruit?

#

ok anyway got led blinking on bluefruit

finite fox
#

@arctic talon just make sure you can blink an LED

#

yeah

#

thats fine 🙂

#

jinx

arctic talon
#

yay

finite fox
#

ok nao....

#

install adafruit tensorflow lib BUT

#

dont do it thru lib manager

#

do it by git cloning into your ~/Arduinosketchfolder/libraries folder

arctic talon
#

that one?

finite fox
#

no this one

#

which is going to be deprecated soon

arctic talon
#

oh right

finite fox
#

(due to google refactoring)

#

but for now its what we has

arctic talon
#

gotcha

#

ok

finite fox
#

so do that

#

then on the CPB

#

it wont work

#

but at least try compiling

arctic talon
#

yep it compiles and uploads, i can push the button but it doesn't hear my yes

finite fox
#

right

#

so at the topo wher eit defines the PDM mic

#

change that to...

#

...

arctic talon
#

ooo

finite fox
#

PDMClass PDM(PIN_PDM_DIN, PIN_PDM_CLK, -1);

#

then recompile n upload

#

it oughta recognize yes/no now

arctic talon
#

it's uploading

#

v slowly

finite fox
#

yeah compiling takes a while

#

microbazel

arctic talon
#

mm failed, but lemme try again

#

ha

#

hmm

#

ok it uploaded now

#

i can input 1 sample, then seems like it dies :/

#

debugging

finite fox
#

yeah there are bugs in that dev

#

which is why i kinda want to refactor soon

#

does it recognize anything

#

or just falls over?

arctic talon
#

is there serial output?

#

seems like i don't see any

finite fox
#

should be some

#

whi8ch arduino ide are you running?

arctic talon
#

let me try with pyserial

#

1.8.10

finite fox
#

please try 1.8.8 if you are using 1.8.10

arctic talon
#

o ok

#

oh hm, the serial port is run by tinyusb huh

#

so reset makes it reenumerate?

finite fox
#

yes

#

that is true of every device with native usb

arctic talon
#

right

finite fox
#

did you download 1.8.8?

arctic talon
#

downloading

#

trying now

#

yay ok got some serial output

#

Recording...Done! Recorded 11776 samples
-----------TFLITE----------

#

ok i see, also works in pyserial now too, just the reset thing

#

no way around that tho unless there is a special soft reset descriptor

finite fox
#

ther eis not

#

thats why i dont use pyserial

#

use the arudino serial monitor

arctic talon
#

ya makes sense, will use arduino

finite fox
#

its smart and knows when you upload, to close the connection

#

your os can get annoyed otherwise

arctic talon
#

ya it's not happy now 🙂

#

ok, so this is kinda where you are on the tflite/speech stuff, modulo refactoring?

finite fox
#

well i have a few more to do before then

#

let me try the other demo

arctic talon
#

ok, did you want my latest tflite?

finite fox
#

not yet

arctic talon
#

k

#

have to run in about half hour or so

finite fox
#

bummer this used to work

#

now it does not

#

ok bye - we can chat again next week

#

i may have the new library refactored by then

#

you can work on the guide page redo meanwhile

#

if you give me your tflite i can hand test it

arctic talon
#

aww :/

#

ok, i'll do the guide

#

for latest tflite

#

for tflite stuff you want me to just wait for your refactor right?

#

i could also try tflite on the pybadge

finite fox
#

you cant because you dont have a mic

arctic talon
#

right nvm

#

🙂

#

will wait for the new mic on tues

finite fox
#

okidoke l8r!

arctic talon
#

bye!

simple shell
#

Arm AIoT Dev Summit! Mountain View, California, December 2 - 3, 2019

The Arm AIoT Dev Summit is a developer-focused conference that provides a platform for you to exchange knowledge, discuss real-world use cases and solutions, and get hands-on with expert-led, deep-dive training and workshops. Along with like-minded developers, data scientists, and innovators, you will experience technologies enabling the Internet of Things (IoT), Artificial Intelligence (AI) and robotics. AND - Get your hands on free hardware worth up to $500!

http://arm.com/AIoT-Dev-Summit

arctic talon
#

@finite fox hi

finite fox
#

hi

#

please start by loading circuitpython onto your edgebadge

#

do you know how to do that

arctic talon
#

ok, yeah let me find the page

#

4.1.0

finite fox
#

post a screenshot of the filesystem

arctic talon
finite fox
#

rename 0.gif to intro.gif

arctic talon
#

ok done

finite fox
#

reload the trondemo.uf2

arctic talon
#

using bootloader right?

finite fox
#

yes uf2's are always loaded using the bootloader

arctic talon
#

cool just checking

finite fox
#

yep!

#

we use UF2 bootloader whenever possible

#

remember you can always BACKUP the code by draggint CURRENT.UF2 off

#

that's how to make a UF2

arctic talon
#

ah interesting

#

ok, so

#

reloaded tron UF2

#

ah okay it seems like it's working reliably now, i see arm AI

#

and then instruction screen

finite fox
#

do you have the mic plugged in

arctic talon
#

yep

finite fox
#

did you cut and solder the power jumper to 3.3V

arctic talon
#

yep

#

it can hear me now

finite fox
#

great you should be able to use it, the electret mic is higher quality than the PDM

#

so it isnt as picky

arctic talon
#

ooh okay cool!

finite fox
#

you can now replace the tflite file

arctic talon
#

so now i can replace tflite

finite fox
#

yes

#

this demo is flaky i have to refactor it

#

its based off the old unreleased tensorflow lite codebase

#

they have a new one, which is way more stable/flexible

#

same code, but memory structure is better

#

however this should run for about a minute or rso

#

and you can use it to test your tflite files

arctic talon
#

okay!

#

yeah replaced with the tflite file from colab and it seems to work

finite fox
#

ok good

#

thats how i test the tflites

#

👍

#

ok what is next

arctic talon
#

awesome! seems easy enough

#

umm, i think i just need to update the guide then right?

finite fox
#

ok so the colab script

arctic talon
#

yeah i fixed it up as you wanted

finite fox
#

did ya get to updating it to name the folder by date

arctic talon
#

can link it in a min

#

yep

finite fox
#

ok cool

#

i will check it then yes!

#

lets update ze guide

arctic talon
#

yeah i copied the one i had

#

one sec

finite fox
finite fox
#

ok lookin

arctic talon
#

i wish there was a better way to run training overnight but not have the instance die

finite fox
#

well but even if it does thats ok right?

arctic talon
#

yeah now it's ok with that notebook

finite fox
#

cause it will save to the disk before 💀

arctic talon
#

was just saying generally

finite fox
#

whats up with the diff?

arctic talon
#

aha

#

so at least on my machine

#

one major problem is that all of the output gets loaded into firefox memory

#

and if it keeps doing that eventually tab crash 😦

finite fox
#

oooh

#

right

#

thats why they had it off

arctic talon
#

unfortunately we want most info

#

i mean just otherwise its' very boring

finite fox
#

can we change verbosity?

arctic talon
#

you can but then you don't get anything interesting

#

it's just running for hours at a blank screen

#

or at least when it starts up, it doesn't look like it's doing anything for a while

#

i think until it hits the first eval checkpoint

#

so i liked this tradeoff

#

do you not like having the diff?

finite fox
#

yahyah

#

nono im just wondering like

arctic talon
#

it's kinda brittle i agree...

finite fox
#

if theres any commandline magic

arctic talon
#

yeah there are atually two flags

finite fox
#

or like, the tensorboard have that show output

arctic talon
#

which show output are you seeing?

#

looking for flag names for ya

#

right so --verbosity sets the log level for non-C++ code

#

you use os.environ['TF_CPP_MIN_LOG_LEVEL'] for the other stuff

#

in practice os.environ[...] seems to mostly affect the startup log messages

#

--verbosity works, but WARN is not very interesting

finite fox
#

one moment

#

brb

#

ok back

#

lemme try running

arctic talon
#

k

finite fox
#

...installing...

arctic talon
#

haha, ya this is why i wish it would snapshot your VM

finite fox
#

hymm something went wrong restarting it

arctic talon
#

hm

#

with pip?

finite fox
#

yeah

#

i dont know

#

i need to start anew

arctic talon
#

k, i'm also going to run it

#

haven't ran for a week

finite fox
#

wait the diff is gone?

#

i think colab is caching things for me

#

oh no this link is wrong

#

plz fix

arctic talon
#

oh i see what happened

#

the run in google colab link you mean?

finite fox
#

yeah

#

i was using that to reload

#

but it went to the original script

arctic talon
#

ahh ok

#

will fix

#

also i had the git clone commented while i was iterating on the patch part

#

now uncommented, will fix the link now

finite fox
#

ERROR:root:An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line string', (1, 0))

---------------------------------------------------------------------------

CalledProcessError                        Traceback (most recent call last)

<ipython-input-4-6a00e8ff0c74> in <module>()
     22          (training_step, learning_rate_value, train_accuracy * 100,
     23           cross_entropy_value))
---> 24 """)

/usr/lib/python3.6/subprocess.py in run(input, timeout, check, *popenargs, **kwargs)
    436         if check and retcode:
    437             raise CalledProcessError(retcode, process.args,
--> 438                                      output=stdout, stderr=stderr)
    439     return CompletedProcess(process.args, retcode, stdout, stderr)
    440 

CalledProcessError: Command '['git', '-C', 'tensorflow', 'apply', '-']' returned non-zero exit status 128.```
arctic talon
#

yeah just fixed that--sorry

#

the git clone command is commented

finite fox
#

ok so reload ?

arctic talon
#

i guess :/

#

you can't edit it right? i can just give your account edit if that makes it faster

finite fox
#

oki doing now

#

i dont want to

#

i want to run exactly what you will be putting in the guide

#

🙂

arctic talon
#

ya

#

🙂 makes sense

#

updated link

finite fox
#

ok its goin now

#

so yah please update the guide

arctic talon
#

sounds good--umm, if i change the page it will go live instantly right?

finite fox
#

yeah but nobody is using it now

arctic talon
#

ok

finite fox
#

make a new page

#

it will be automatically 'private'

arctic talon
#

cool

#

will do that

finite fox
#

we'll keep the old pages for historical ref

#

im in another window so if you need something @ me

arctic talon
#

@finite fox i think i don't have enough magic admin powers to make a new page

#

don't see the new page button at left

finite fox
#

oh one se

#

thats odd you're a contrib

#

?

arctic talon
finite fox
#

you're in edit mode?

arctic talon
#

oh i see

#

no

#

was not

#

ah i see--always need to access from within Admin to get there

#

ok

#

thanks

finite fox
#

rad

#

☕ for me

arctic talon
#

@finite fox also when you have a min--i've been scaling all the images down to like 400px because they all need to be indented to keep the guide readable

#

this is because most of the images are of more text, so if i don't do this you don't even realize it's an image

#

however i realize this isn't good across devices....so wondering if there is a better way?

finite fox
#

hi back

#

can u show me an example

arctic talon
#

here is my new page

#

i just replaced the first image with a full-size screenshot

#

but what i do now is scale that screenshot to 400px wide

#

i'd rather scale it in the page editor

finite fox
#

i think it looks good

#

could put white space around it in your photo editor

#

or a border

#

either way

#

could also use a 'side2'

arctic talon
#

i tried side2

#

can do whitespace

finite fox
#

ok!

#

i like the minimal training output you did

#

good middle of the road

arctic talon
#

thanks 🙂

#

i don't like starting long-running computations without being able to see something

finite fox
#

i agreee!!

arctic talon
#

okay, ready for a look

#

@finite fox forgot i should @ you

finite fox
#

hi ok

#

i will check after i eet

#

whats next?

arctic talon
#

that's probably all for today--i have to head out in about 20 min. but i think next would be either the speech capture guide or hacking more on the pybadge

#

what do you think?

finite fox
#

@arctic talon ok next up speech capture

grand moon
#

one "trick" for making an inserted image 'obvious' is cut some non-essential element at one edge in half when you crop it... saves artificially inflating the image size with borders (although "white-space" for preventing eye-fatigue is a thing too... though not necessary for it to be "white") [am I making sense? or confusing things?]

#

also "drop shadows" look nice if done tastefully

finite fox
#

@arctic talon hhihi

arctic talon
#

@finite fox hey!

finite fox
#

hii

#

sorry was totally slammed this week

#

however i have an IDEA

arctic talon
#

totally fine!

#

ooh

finite fox
#

so

#

did you see this thing

#

hold on i gotta find it

#

shoot man where did it go

arctic talon
#

noooooo

#

oh whoa

#

neat!

#

how fast is this thing?

#

i'm trying i tnow

finite fox
#

no idea

#

i have not had a moment to try it

#

so please try it

#

maybe its good

#

maybe it does what we want

#

lotta maybes

arctic talon
#

haha

#

what do we want it to do?

finite fox
#

well

#

maybe we could deploy models made with this tool to a raspi OR a microcontroller badge?

#

next up - please try out this guide

arctic talon
#

let me generate a model and i'll see what it can do

#

ok will try that guide

finite fox
#

thanks

#

do you have a pi 4?

arctic talon
#

no i have a pi 3 :/

#

will get a pi 4 eventually

finite fox
#

get one nao

#

also get a display

arctic talon
#

ha okay 🙂

finite fox
#

also get whatever fixin's

#

srlsy the 4g's are hard to get

#

so grab one now

arctic talon
#

oK!

#

did not realize haha

#

was waiting for an ML model i needed to run

finite fox
#

maybe this site can generate lite models we can run

#

would make training ez

arctic talon
#

yeah that would be an awesome demo!

#

it probably doesn't generate bounding boxes?

#

i wonder if it's possible to make a Colab generator site

#

or something to make it easy to set up colab

finite fox
#

no i think its the non-spliced up demo

#

its pretty simple

arctic talon
#

do i need a heatsink?

#

like 82% of max speed w/o it i guess

#

oh but won't fit with display

finite fox
#

you can get a lifter

#

will also fit underneath

#

you dont need a fan, it works without

#

and you can upgrade the firmware - apparently that helps a lot too

arctic talon
#

prob will skip the fan if the heatsink does enough cooling

#

do i need to get like a female-to-female header to connect the two boards

#

?

finite fox
#

@arctic talon the pitft to the pi?

#

no its plug n play

arctic talon
#

yeah

#

oh ok great

#

looked like they both had male header pins so wasn't sure

finite fox
#

OK and the colab guide is ready to review

#

no no thats a secondarybreakout

arctic talon
#

oh ok great!

#

oh were you asking if the colab guide is ready?

#

yeah take a look at that, plus the speech capture notebook is also ready, haven't done a guide for speech capture yet

finite fox
#

thats ok

#

whats the guide you did

#

ill review it now

arctic talon
#

for training

#

it's just a page on your guide

finite fox
#

linky plz

arctic talon
#

finding link

#

^that's the lifter right?

finite fox
#

@arctic talon yep

arctic talon
#

whoa that thing trains way faster than colab...well, i was using small images but

#

hmm i might need to try with some different images

#

stats are all weird on my model. but let me see what it exports

finite fox
#

ok

#

i made your guide page live, thanx

arctic talon
#

yay!

finite fox
#

do you blog on the site?

arctic talon
#

no haven't done that, pt has usually for me

finite fox
#

np ill have him blog it!

arctic talon
#

awesome, thanks!

#

last thing i need for raspi...don't know that i have a 2.5A wall wart

#

is out of stock 😦

#

do you have a recommended replacement? or maybe 2.1A is ok?

finite fox
#

you need one with a USB C end

#

check amazon

arctic talon
#

i have an A->C usb cable

finite fox
#

you can use your motherboard port

arctic talon
#

not good enough to do the power neogitation?

#

ya

#

that works

finite fox
#

it doesnt really do negotiation

arctic talon
#

it's just like resistor shorted on one of the data wires/

finite fox
#

correct

#

it is not done on the Pi 4

arctic talon
#

gotcha

#

ok i shoudl be able to make do with the A->C cable for now

#

ordering!

#

weird, i downloaded my model as regular TF SavedModel but it gave me some garbage...

#

a labels.txt but no actual model

#

keras seems more promising, 2.5M

#
Model: "sequential_4"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
sequential_1 (Sequential)    (None, 1280)              410208    
_________________________________________________________________
sequential_3 (Sequential)    (None, 2)                 128300    
=================================================================
Total params: 538,508
Trainable params: 524,428
Non-trainable params: 14,080
#

seems like maybe it's two models attached together

finite fox
#

see if maybe someone else has tried this

arctic talon
#

they gave some example code to try it on colab

#

i'm just running it

#

it had 1 trivial bug but it worked otherwise

#

this was with the keras model format

finite fox
#

@arctic talon can you have it run with your first colab detection script

arctic talon
#

what do you mean?

#

oh like run that model using the first guide?

finite fox
#

yeah

arctic talon
#

from back in sept

finite fox
#

that did the coffeecup detection etc

#

maybe good for testing?

arctic talon
#

seems like it

finite fox
#

ok please try that next!

#

i wonder if we can take the speech training demo and flatten it for microcontrollers

#

i think not

#

but ill ask tf folx

arctic talon
#

convert to tflite you mean?

finite fox
#

yeah

#

can it not make tflite, only tf?

arctic talon
#

oh! at the time i didnt' know how to do it, but i thought i saw something about that now

#

let me see if i can find it

#

can try that too if you want

#

can you try the speech training demo in your browser when you get a min?

#

it seemed like my accuracy problems were all related to not clipping the audio sample (i.e. clicking the record/stop button on my laptop made an audible click that was throwing it off)

#

wondering if you also see the same accuracy

#

now that i've added a small clip

finite fox
#

@arctic talon sorry i am feeling kinda sick

#

plz send an email ill look later

#

restig

arctic talon
#

oh okay, feel better!

arctic talon
#

@finite fox hey i'm doing the edgebadge guide, but which board library do i need to add to arduino to compile for edgebadge? i updated SAMD boards to 1.5.7 but don't see edgebadge in the list. have to run now but will hack on it more this afternoon

finite fox
#

@arctic talon hihi

#

use the pybadge def

arctic talon
#

@finite fox oh dear. i updated to catalina and Arduino is not happy. it looks like i might have to update to the latest arduino IDE....but IIRC you had me try 1.8.8. do you know why the latest one is incompatible with pybadge?

#

the precompiled bouncing ball does work on my edgebadge, though

finite fox
#

@arctic talon 1.8.10 should work, i just don't happen to use it.

arctic talon
#

@finite fox i got micro_speech_arcada to compile and upload to edgebadge, shall i try to replace with a model from teachablemachine?

oblique hawk
#

@finite fox how important is TFLite perf to Adafruit?

finite fox
#

@oblique hawk we're not bound by it, but we also like having spacious chips like the '51

#

i think performance is important to the tensorflow team

#

they'd like it to run fast on slow chips

#

@arctic talon im almost positive that will not work

#

ask in the gitter before you try

#

however, you should try it on a raspi running TF or TFLite

oblique hawk
#

well - I'm willing to share my first round of optimizations, but I'm also trying to get work as an optimizer with the TF team

finite fox
#

as a paid contributor?

oblique hawk
#

From what I've seen, I'm not sure they really care about performance

#

yes

#

that's my job and I'm looking for work at the moment

finite fox
#

we dont have any insight into how that team hires

#

the gitter seems to be the fastest way to interact with them

oblique hawk
#

I've interviewed with Pete W and he wanted a warm body in a chair in MV; I only work remotely

finite fox
#

ahh

#

yeah - pete leads the team

#

sorry to hear that 😦

oblique hawk
#

yep

#

the fact that it was so easy to get to 2x means that they really don't have anybody "minding the store" as far as perf

finite fox
#

yeah its very very very early

#

like i submitted a "hey stuff isnt compiliing" issue and its been over a week 🙂

oblique hawk
#

true, but according to them 3B devices are running the code. That's enough to at least put a small effort into optimizing it

finite fox
#

what sort of optimization work do you wanna do?

#

3B???

#

i dont think that sounds right to me

oblique hawk
#

I'll clean up their SIMD code, fix data locality issues, and fix it on small targets with no SIMD

finite fox
#

tflite micro in particular is not well distributed

oblique hawk
#

their approach to all platforms is not quite optimal 🙂

finite fox
#

yah

oblique hawk
#

to give you a hint, they're using NEON_2_SSE.H

finite fox
#

have you by chance ever done mp3 codec optimizations

#

or just gfx?

oblique hawk
#

I can optimize basically any C/C++/ASM code. I don't even have to understand the algorithm too well. I can just spot the common mistakes made by "abstract thinkers"

finite fox
#

yah

#

i may have some mp3 optimziation work later

#

i want to add mp3 decoding to circuitpython

#

and the code people are using is from like 15 yrs ago

oblique hawk
#

they don't really know how computers work and do things like dynamic structures in inner loops, unnecessary double precision math, etc

#

sounds like a fun challenge

#

BTW - I also wrote my own JPEG codec, so MP3 shouldn't be too bad

finite fox
#

kk im def not ready for it yet

#

i want to get it worked in first, then optimized

oblique hawk
#

let's go private for a moment...

finite fox
#

thing is...i dont want ASM optimizations

#

hiya i have PM's turned off

#

you can email pt@simple shell if you have questions

#

again this isnt soon

oblique hawk
#

I do whatever level of optimization the client wants

finite fox
#

its a future future thing 🙂

#

yeah cirucitpy needs to run on a range of processors - MOST are cortex...but some are/will not

oblique hawk
#

I worked for 3.5 years at Google ATAP (various teams including Soli and Spotlight Stories). They got to trust me to just "make it go faster" and it worked out wel

finite fox
#

heh i hope some of it shipped

oblique hawk
#

Soli and Spotlight shipped a bunch, a team that I really helped got canned

finite fox
#

sux 😦

#

arduino team and paul s may also be interested in an optimizer

#

i have to go to a meeting

#

you can send an email

oblique hawk
#

yes, I rewrote a camera pipeline with some unique ideas and it had great potential

finite fox
#

i want to set expectations tho - may not have antying til 2020 🙂

#

as everyone's on break in lik.... 3 days 😄

oblique hawk
#

well - part of my going to the AIOT summit is to job hunt

finite fox
#

good idea!

oblique hawk
#

I was hoping that some non-Google companies would pay $ for better perf. It's usually an uphill battle to convince them they need me, but after they see what I can do, the resistance fades

#

I also sometimes have to call people's babies ugly - which doesn't go over well

#

Anyway, I think I will do a PR for the 2x speedup since it was pretty simple

#

depends if Google asks nicely 😉

arctic talon
#

@finite fox ok, in sig-micro?

finite fox
#

@arctic talon yah

#

@oblique hawk ok got email - i realize i have a small project you could tackle

#

will reply to email later - but our GIF decoder could probably use a scrubbin

#

@oblique hawk what adafruit hardware/displays do you own?

ripe night
#

@oblique hawk I'm happy to chat too if you want to bounce ideas and @finite fox is busy

oblique hawk
#

I've got a few feather boards and 2.2" pitft

#

nRF52832, nRF52840 and M4 express

#

Funny you should mention GIF because I wrote my own optimized codec

#

@ladyada

oblique hawk
#

I see some good opportunities to speed up that code. I'll respond in the email

finite fox
#

@oblique hawk ok rad - yeah i dont care if you wanna swap in yr own codec - we just found this one and massaged it until it worked well with our DMA code

oblique hawk
#

I tweaked the existing code and just passed 2x 🙂

#

@finite fox

#

not done yet

rancid fossil
#

Optimized GIF codec? That could be handy, the one I'm currently running is probably not very optimal.

oblique hawk
#

yep

finite fox
#

@oblique hawk sounds good - yeah could be up to 5x in there

#

i do want to make sure that its still modular enough that we can use it in arduino contexts without too much nastiness

#

do you use static vars in general?

#

also please work by submitting PR's

#

and mark me as a reviewer

oblique hawk
#

I didn't restructure the code at all. My first pass changes are innocuous looking, but make a major change in perf due to better file/data handling and using stack vars (which turn into register vars) instead of member vars

#

@finite fox

finite fox
#

okidoke

oblique hawk
#

We can take it to more extremes once I've exhausted less intrusive changes

#

The main goal of my first pass is no change in structure, no change in portability

finite fox
#

yes - we did some palette optimizations you will see. there is some 'profiling' code that prints out speed but you will want to use pintoggles

oblique hawk
#

I use Xcode instruments (for now) 🙂

finite fox
#

as the profile code may not be trustworthy

#

sure - things get fun when you are dealing with QSPI caching 🙂

oblique hawk
#

even though X86 and ARM are pretty different, C/C++ code comes out performing remarkably similarly

finite fox
#

sure

oblique hawk
#

the main speedup was from cleaning up the file handling

#

It's really hard to write fast C++ that has well designed classes. The 2 are at odds with each other.

#

I can fork the repo and start sharing my changes already to Github

#

I had to #ifdef a few things for the Mac versus Arduino. I'll pull those out when I'm done

#

What surprised me is how fast my machine is at running the code. 10,000 decode iterations of a 240x320 file (with output pixels written to a memory buffer), runs in 3.69s of CPU time on a single thread.

finite fox
#

GIFs are very old tech 🙂

arctic talon
#

@finite fox ok, i was able to run one of the teachablemachine models on raspi. i installed an unofficial build of tf 2.0 and it seems to work. the accuracy of my model wasn't very good (teachablemachine only runs for about 50 iterations by default) so i'm not confident in the output of the network other than to say that it detected something

#

this was just for image recognition

#

i tried to train a speech recognition model, but it only outputs to JS

finite fox
#

@arctic talon does teachablemachine website work well at all?

arctic talon
#

@finite fox it can create a model and you can download it. there's supposed to be a way to save your "project" to drive, that did not work for me (auth connector busted). also, the speech recognition one basically requires you to use your microphone to record--you can't upload samples easily

random ibex
#

I’m really new to the world of ML so this may be a stupid question, but are there any SBCs that can train machine learning models?

floral iris
#

@random ibex The Adafruit tutorial on training TensorFlow Lite says, "Give it as many CPUs and as much RAM as you can spare. You need to give it at least 8 GB of RAM or gcc will fail with a very annoying and somewhat confusing error like this (but on some other file)." Perhaps some other ML frameworks are less demanding but single-board computers typically aren't up to that task. https://learn.adafruit.com/how-to-train-new-tensorflow-lite-micro-speech-models

Adafruit Learning System

Pick some words to be recognized by TensorFlow Lite

gusty fulcrum
#

you could train the model on a beefier machine and use a pretrained model on the sbc 😄

river willow
#

Yo! I'm trying to learn some super basic ML, and trying to wrap my head around some example code. A bit confused about the derivative of the sigmoid function, as I've encountered it as the following in two places:

def sigmoid_derivative(x):
    return x * (1.0 - x) 
#

But according to a stackexchange post it should be:

(d/dx) σ(x)=σ(x)⋅(1−σ(x))
https://math.stackexchange.com/questions/78575/derivative-of-sigmoid-function-sigma-x-frac11e-x

Are these two the same? Am I just misunderstanding some basic maths?

#

Oh! I think I got it now. The sigmoid_derivative function looks like that, because x has already been run through sigmoid. My bad 🤦‍♂️

raw nymph
#

Guys does TF support esp32?

#

or it needs arm architecture?

cyan idol
#

Hi @raw nymph. It's possible the esp32 might be able to run TFLite since the SAMD51 chips can, but I haven't heard of anybody who has got it running on there.

stone dirge
#

google "TFlite esp32" turned up a few github repositories with sparse information....

oblique hawk
#

The Arduino copy of the TFLite code doesn't have any CPU-specific optimizations, so it should compile on all targets

floral iris
raw nymph
#

Yay!!!

twilit saffron
#

@floral iris what's that clickbait? comes up with a paywall saying i have reached the limit for this month.... i've never been to the site before. please dont spam clickbait

#
Hackster.io

A robot that learns to move towards the nearest obstacle and maintain a minimum distance using deep reinforcement learning on an ESP32. By Aslamah Rahman.

arctic talon
#

@finite fox the full TF teachablemachine model runs on rpi4 @~10fps now. haven't tried to optimize it much yet. i could try converting to tflite to see if framerate improves, or write up what i've got so far, what do you think?

finite fox
#

@arctic talon hi when you are back to working please send email

#

im not always in discord

quasi pike
#

Ok, so I've been cursory looking at machine learning, and it sounds interesting to pursue for some experimentation. Is there a good "foundation" book to get the jargon and basic understanding of nomenclature and such?

spring pilot
quasi pike
#

There appears to be a 2nd edition of the book...is that a better option?

spring pilot
#

Yes, absolutely. I thought I had linked the 2nd ed, but apparently I missed. Sorry!

quasi pike
#

Just making sure, it seems this is a fast moving target, so I imagine books "age out" quickly

spring pilot
#

You should try DNA engineering and gene editing. A researcher at UCSF told me, "use mailing lists, don't buy books. The whole field changes in about six months."

quasi pike
#

Since "doing" while learning sounded interesting

spring pilot
#

That one's not bad. I thought you were going for a more general approach. TensorFlow is good for a subset of problems, but there are more general techniques.

quasi pike
#

Well, that is...part of the issue, Tensorflow lite is what caught my attention....

#

however, I imagine there is a bunch of back knowledge I need before starting in on a particular package or such

#

Kinda going at this backwards, the application on MCUs interested me, now I need to understand the beginning to get to there. If that makes any sense?

spring pilot
#

Oh, there absolutely is, depending on how deep you want to go. The basic techniques are just algorithmic understanding. If you want to modify those techniques, you need a good working knowledge of statistics at least, and analytic geometry, with a bit of linear algebra. Once you get into deep learning, it's calculus.

quasi pike
#

Oh...fun~

#

chuckles

spring pilot
#

That's why I suggested the books I did. No (little) math, but a good explanation of ML algorithm implementations, with Python examples.

quasi pike
#

I will certainly take a look

#

thank you for the point in the right direction

spring pilot
#

Cool. Feel free to reach out if you have more questions!

quasi pike
#

I am at the point of "I heard of a thing that sounds interesting", and am trying to find the way down the rabbit hole 😉

spring pilot
#

It's a very deep rabbit hole. 🙂 Once you've done ML, if you want, you can branch out into AI....

pearl osprey
#

is exactly at this point.

#

i'll probably ask some questions here at some point, I have a (non-electronics related) project that will probably use ML, and why not AI ...

spring pilot
#

@pearl osprey ML is technically a subset of AI, but they're used to solve different kinds of problems. Find out how closely two documents are related - ML (I've done this one). Predict what kind of information security attack is under way and how to respond to it as it collects new data - ML (or Bayesian statistics) (did this one, too). Identifying food web dynamics and extracting predator-prey relations - ML. Taking a fitness function and discovering how to maximize it in a given environment - AI. Identifying objects in pictures - AI (done this). Extracting behavioral patterns from high-volume event data at scale - on the fence, both ML and AI (I've done this one, too - IDS analytics on 14 million EPS data feeds.)

#

So if you have questions, fire away!

pearl osprey
#

nice. I have automatically classified 3k-4k texts in categories with LDA (so basically ML) to make socio-semantics graphes (who published about what with who) years ago. now i'm trying to code a bot to find an anonymous author given many other attributed texts

#

style analysis. I already have a few methods I want to implement, but I expect the results to be difficult to analyse, or difficult to add-up some elements with different "weight" in the final decision...

#

but I will come back with precises questions when I'll need advice 🙂

spring pilot
#

@pearl osprey Ah, NLP. The method I used (which, coincidentally, identified docs written by the same author, completely unintentionally) was to do the usual NLP parsing bits. Remove punctuation, lowercase, remove stopwords. Each word is a dimension. Each cell contains a list of source documents in which both words appear. You end up with an n-dimensional array (suggest sparse 🙂 ). Then, when presented with a new doc, just extend the Pythagorean theorem to calculate n-dimensional "distance" between the training docs and the new doc.

pearl osprey
#

interesting. the methods I'm reading about don't remove stop-words list, because they try to compare most used words proportion, length of words distribution ... for example

#

but yeah, I'm coding the data collection first. then the analysis tools and report.

spring pilot
#

The other thing you can do is write a tokenizer in lex. Then you tell it the stopwords are token separators. The output will be a token stream of phrases not broken by stopwords or punctuation. 😉 I didn't get around to do that one, but it seems the logical next approch. Once you have phrasees then you can play the same Euclidean distance game in n-dimensions....

spring pilot
#

@pearl osprey (As you can probably tell, my thing is inventing new approaches to things.)

rancid fossil
#

I have an unhealthy fondness for lex and yacc.

spring pilot
#

Me, too. Of course, in my compiler class we weren't allowed to use them, so we wrote everything by hand. 🙂

pearl osprey
#

is taking notes for future readings

#

for now I'm playing with accelerometer, TFT displays, sprites etc. back to the basis...

floral iris
#

@rancid fossil Just today I learned of tmg, a pre-yacc compiler compiler also done at Bell Labs. https://en.wikipedia.org/wiki/TMG_(language)

TMG (TransMoGrifier) is a compiler-compiler created by Robert M. McClure and presented in 1968, and implemented by Douglas McIlroy. TMG ran on systems like OS360 and early Unix. It was used to build EPL, an early version of PL/I.McIlroy wrote TMG on a piece of paper and "deci...

spring pilot
#

Yeah, TMG was a tad before my time.

floral iris
#

It's been noted from time to time that "yet another compiler compiler" is the only compiler compiler that's survived from that time, somewhat ironically.

spring pilot
#

If it ain't broke?

floral iris
#

Or at least it was the least broken of all those contenders. 😄

spring pilot
#

Like, vi vs. that horrendous editor on the IBM3080?

#

(vi = not broken) 🙂

#

And remember when Sun took the C compiler out of Solaris, which is why everyone uses gcc instead of ... whatever the Solaris add-on C compiler was called. LOL!

floral iris
#

So many missed opportunities... But I have no reference for anything from IBM3080, and I'm really not sorry to say that. 😄

#

I had a slight taste of JCL once upon a time and ran fast the other way.

spring pilot
#

Good choice!

floral iris
#

"wwb's utilities were capable of analysing text for parts of speech, and for word and sentence length, and of comparing the results to established norms."

spring pilot
#

I've never tried it. I'm fond of Princeton's WordNet, though (even though it's pretty much a dead project.)

floral iris
#

(Gratuitous name dropping: I met Lorinda Cherry once at a sports car race, purely by chance, and got to chat with her for a while.)

spring pilot
#

Not familiar. Can you give me a precis without saying HLMGTFY?