Raspberry Pi 4 (8 GB) with YOLOV4/YOLOV4-TINY using Tensorflow-lite? - raspberry-pi

What is the best way to run YOLOV4/YOLOV4-TINY on RPI 4 using Tensorflow-lite for object detection? I want to detect/count the no. of people in the room using this followed by detection of items like chair, banana e.t.c?
As far as I know these libraries have MIT license and can be used for educational/commercial purposes, is that correct?
Also, what works better on Rpi 4 with tensorflow lite, is it YOLOv4 or YOLOv4 Tiny or something else?
Thank you.

You can take a look at the TFLite Object Detection Raspberry Pi sample. It use EfficientDet-Lite models which works well on Raspberry Pi 4.
https://github.com/tensorflow/examples/tree/master/lite/examples/object_detection/raspberry_pi
If you need to train a custom model, you can use Model Maker. See this notebook to learn more.
https://github.com/khanhlvg/tflite_raspberry_pi/blob/main/object_detection/Train_custom_model_tutorial.ipynb

I haven't tried by myself, but YOLOV4-TINY has a weight size around 16-24MB, that's similar to MobileNet float. I think that might be a better fit for small devices like RPi4. Could you give it a try and let us know if it works? :)
As far as I know these libraries have MIT license and can be used for educational/commercial purposes, is that correct?
TensorFlow and TensorFlow Lite are under Apache License. You can certainly use it for educational and commercial purposes.

Related

Where to get started programming iBeacon BLE sensor modules?

I'd really love to learn to program cheap sensors and modules such as this one:
barometer sensor nRF51822 bluetooth module ibeacon LPS22HB, CR2032 battery holder, specifically to use within iOS and Swift.
I reached out to the company who makes them and tried researching how to get started multiple times, but I really can't figure out where to start. There are also pre-programmed modules, but my interest is programming these cheap ones to fit my needs.
I have the linked module, and a few others, and they appear and can be connected to using beacon detector apps, but display no understandable info.
I'd like to read the barometer pressure reading to start. Help is highly appreciated, I'd love to start working with these.
EDIT/UPDATE: I was able to read the modules manufacture name on one of many iBeacon scanner apps I tried and their name is Yunjia. With this information I am able to find alot more details online about what I have. One website says for these chips I can use LightBlue (the app I used to find the manufacturer name) to modify, read, and write to the module. Any additional advice is welcomed, I'll be researching and testing things out.
I also found the Schematics along with some additional info hidden in the seller website.
Edit 2: I found the manufactures little YouTube channel with some info, looks like I just have to do lots of research and testing and learn everything. https://www.youtube.com/channel/UCvqhWNqDE-v0je0X8XAEF2Q It contains some video instructions.
Edit 3: My short term goal of reading the barometer data was a success! After tons of digging I found I just had to write a value of 0x01 to turn on all sensors, then I was flooded with data and the barometer pressure in bytes which could be translated to the actual amount. Write 0x00 to trun off all sensors.
Apple's iBeacon framework is dirt-simple and very easy to use. It allows you to listen for beacons based a unique UUID, major id, and minor ID. It lets you know when a beacon enters or leaves range, and provides crude (immediate, near, medium, and far) distance values. You can create "beacon regions" that will notify your app when you enter or leave them. That's about it.
If you want to do something like read barometric pressure or temperature readings, you will need to either write your own low-level BLE code or use an existing library. My guess is that these modules are using very standard hardware and that you should be able to find libraries to read their specialized data.
Failing that, you will need specifications on their BLE interface and need to learn how to write Apple Core Bluetooth code. (The link you posted has zero specifications for the units. The only thing it provides is the numbers "nRF51822 bluetooth module ibeacon LPS22HB" (It's not in well-formed English so I don't know how to parse those descriptive terms. I'd google those numbers) Note that Core Bluetooth is a fairly low-level framework and not very easy to learn.
EDIT:
Googling "nRF51822", that is apparently an ARM based chip that includes radio hardware that supports BLE. It sounds like that is a general-purpose chip that vendor would use to build a BLE module. Given that, you'd probably have to reverse-engineer it to figure out how it works.
The "LPS22HB" appears to be a solid state pressure sensor that can be used to build a barometric pressure measurement device. It's no doubt interfaced with the "nRF51822". Without specs you're going to have a very hard time figuring out how it's interfaced however.

Can we read heart beat data from wear os using raspberry pi

I have purchased a Ticwatch which is running Android wear OS. I want to read the heart beart data from the device over bluetooth using raspberry pi. I found no resources to do so. But I found a tutorial to do so using Polar H7. Link below:
https://github.com/danielfppps/hbpimon
But the same thing is not doing anything with Ticwatch wear OS.
Can anyone even tell me if this is even possible ?
I haven't done this myself - it's quite likely that nobody has, it's a real corner case - but I have no doubt that it's doable.
Getting the heart rate data on Wear is pretty easy; there's an API to do just that. Here's a SO Q&A with some basic code to do so: How to read Heart rate from Android Wear
Transferring that data to your RasPi is going to be more work, but it's still eminently possible. Both devices support a full Bluetooth stack, but there's no simple API for this, so you'll have to build this piece more-or-less from scratch. On the Android side, a good starting point is Google's Bluetooth Chat sample: https://github.com/googlesamples/android-BluetoothChat
In summary: Anything's possible. Many things are difficult.
I ended up creating my own app on Wear OS. Thanks for all help.

how could monitor device status using raspberry pi

I want to build a small project which will monitor some devices(pump,ac etc) status(on/off, current/voltage level etc). I have decided to use raspberry pi 3 as a server. I am thinking about scada. is it efficient to do these works? also i am not familiar to scada. is there anyone to guide me--
where should i start?
what is the suitable software for doing it??
You could just use Python and the RPi.GPIO module to control and monitor the GPIO pins on the Raspberry. Python is powerful, open-script and easy to get into.
You would need to develop a bread-board to protect your Raspberry and allow for monitoring higher voltages.
Some example code on using GPIO with Sockets here: https://github.com/matzpersson/raspberry-gpio-sockets
You may use ScadaLTS on Raspberry.
In ScadaLTS have available modbus protocol among many others.
This is web oriented software with graphics views drag and drop editor.
For now you may read GPIO data programmatically to file and use ASCII File Reader DataSource.
We plan to have datasource dedicated for GPIO.
ScadaLTS based on ScadaBR - fast tutorial https://www.youtube.com/watch?v=JjOQWwoaQuQ.
you could also check out mySCADA. they make a solution for Raspberry pi at http://www.smarthouse.cloud
you can use the GPIO on the Pi or talk to industrial PLC's.

Newbie: Basic Communication using Simulink and USRP2 devices

I would like to start a semester project related to Matlab Simulink and USRP devices. I am new in this field and studying regularly about it...
The first step to setup the devices is completed and now I would like to check if both device can communicate properly. For this Reason can any one suggest a simple Communication Module...
anything would be OK to start with. e.g sending text, Image, Voice, Video etc etc...
Regards
I suggest you take a look at the communications toolbox in matlab:
USRPĀ® Support Package from Communications System Toolbox
There seem to be some code snippets for simulink available as well.
BR
Magnus

External device input

I am looking into what's the best method for getting external data (custom built hardware) and to intercept and process this data (programming language / tool), the cheapest and easiest and with the least learning curve.
Background:
I am a web dev.
External device will be switches, motion detection, velocity detection
Programming language: Delphy (which I don't know)? or C# (which I know for web dev) or other?
Anyone done anything like this before? Got any advice?
Any and all information is appreciated.
D
The easiest solution might be to use an Arduino.
It's :
cheap (~ 30$)
easy to program
easy to connect to your PC (it use an USB cable which emulate a serial connection)
have a HUGE community with tons of tutorials for doing whatever you want
Here is an example how to control a led using C#