-
All I want is a blob!
02/17/2022 at 04:51 • 0 commentsIt has been about two weeks since my last post. I got sidetracked with a few other projects, but I'm back on task. I was hoping to have the Microsoft MegaDetector converted into a MyriadX blob by now but I keep hitting stone walls. I have spent quite a bit of time trying to tweak the model optimizer parameters. I started out with the default parameters:
import blobconverter blob_path = blobconverter.from_tf( frozen_pb="/path/to/md_v4.1.0.pb", data_type="FP16", shaves=5, optimizer_params=[ "--reverse_input_channels", "--input_shape=[1,513,513,3]", "--input=1:mul_1", "--output=ArgMax", ], )
After some trial and error using the BlobConverter CLI and Luxonis MyriadX Blob Converter methods, I seemed to find what I believe are the correct model optimizer parameters.
import blobconverter blob_path = blobconverter.from_tf( frozen_pb="/Users/shadow/Desktop/OpenCV_Competition/MegaDetector/md_v4.1.0.pb", data_type="FP16", shaves=6, optimizer_params=[ "--reverse_input_channels", "--input_shape=[1,600,1024,3]", "--input=image_tensor", "--output=Softmax", ], )
The latest error states: "[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.CheckForCycle.CheckForCycle'>): Graph contains a cycle. Can not proceed." I'm going to try following OpenVINO's method for Converting TensorFlow Object Detection API Models.
If this method does not work I will examine other methods for achieving our goals.
-
Pan and Tilt 3.0
02/01/2022 at 22:17 • 0 commentsPanning works great while upright and inverted. Tilting has a bit of jitter. Still working on getting rid of that. Sorry, I didn't take pictures of the first two versions.
-
Abracadabra the API has Reappeared
02/01/2022 at 21:59 • 0 commentsAfter a bit of searching, I found the original API methods in the commands folder. I used
from commands.hub_methods import hub
to import them. Everything works as it should.
Then... I'm not sure what happened, but I plugged the Hub into my computer and connected it to the MINDSTORMS app and it made me update my hub. A little annoying, but okay. Afterward, on a lark, I tried to import hub using
import hub
and this time it worked.
I connected the hub to my Raspberry Pi and read the raw data being sent over the USB connection. The hub automatically sends status updates about the ports, the battery, and the IMU. This status update is sent about twice a second. Learn more here.
I played around with connecting over Bluetooth and had issues maintaining a connection with the hub to my Raspberry Pi 400. I read that others had the same issue as well. I came up with a solution but it involved reconnecting every time the connection was lost. Recently, I came across a Hub2Hub communication method and it uses a Raspberry Pi in its demo. I'm going to give it a shot and report back.
-
Oh NO! There is a new API...
01/25/2022 at 19:19 • 0 commentsMy hopes were dashed when I saw that the LEGO MINDSTORMS Robot Inventor uses a new API. The LEGO GitHub repository is for the first version of the API. The newest version 3 has been gutted and restructured. While some of the API changes make programming the MINDSTORMS Hub easier, I need the raw potential it once had. It is based on MicroPython so let's see which modules and functions are still left in tack.
It appears that we may still have access to Bluetooth communications.
We can also list files in the directory and read them. Well, this is going better than I expected. I will need more time to explore and test whether we will be able to use this.
-
LEGOs has arrived!
01/25/2022 at 18:27 • 0 commentsWe ended up ordering two items and got the Year of the Tiger box FREE! We ordered the LEGO MINDSTORMS Robot Inventor and a small LEGO 4-Stud Red Desk Drawer. Some people might be asking why we purchased the Desk Drawer, but it turns out it is a giant LEGO. These Desk Drawers are containers that connect the same way the regular-sized LEGO do. This was also the best way to enclose our base station and still remain within the budget of the LEGO voucher. Time for a little exploration. We will be back soon.
-
Getting to know LEGO MINDSTORMS Robot Inventor
01/25/2022 at 18:09 • 0 commentsWe decided to get the LEGO MINDSTORMS Robot Inventor with our voucher because we wanted to use its motors more than anything else. We are torn between purchasing the Raspberry Pi Build Hat or trying to finagle the MINDSTORMS Hub to communicate with our Rasberry Pi.
We decided to download the LEGO MINDSTORMS app and poke around. There we discovered that you can program the MINDSTORMS Hub in python. We quickly checked to see if there was a GitHub repository and luck would have it there is. The MINDSTORMS Robot Inventor uses a version of MicroPython and there is an API that allows you to access the Bluetooth and USB communication.
Searching for possible solutions for our problem brought up nothing of mention. There are a ton of solutions for older versions of the MINDSTORMS though.
Until we have the MINDSTORMS Robot Inventor in front of us we will have to wait to explore this further.
-
Waiting on LEGO sets so...
01/25/2022 at 16:42 • 0 commentsWhile waiting for the LEGO sets, I set up the OAK-D Lite and tested some ArUCo marker recognition code on it. I selected five ArUCo markers to test. I then built a test rig to test our localization and mapping code.
-
The OAK-D Lites have arrived!
01/25/2022 at 15:59 • 0 commentsThese two bundles of joy have arrived earlier than expected. The OAK-D Lite packaging is more polished compared to that of the original OAK-D. I open one up and started putting it through its paces immediately.