
mjdargen's instructables
Achievements
- mjdargen's instructable Laser Engrave Spotify Codes!'s weekly stats:
- mjdargen commented on mjdargen's instructable Gom Jabbar From DuneView Instructable »
Thanks! Glad to hear someone else is getting a kick out of it!
- mjdargen's instructable TV Show Ratings on Beautiful Graphs's weekly stats:
- mjdargen entered TV Show Ratings on Beautiful Graphs in the Anything Goes Contest 2021 contest
- mjdargen's instructable Plot COVID Data on Interactive Graphs's weekly stats:
- mjdargen entered Plot COVID Data on Interactive Graphs in the Anything Goes Contest 2021 contest
- mjdargen commented on mjdargen's instructable Animal Crossing Music PlayerView Instructable »
Me too! That's why I had to create this project. 5pm is a banger!
- mjdargen's instructable Animal Crossing Music Player's weekly stats:
- mjdargen's entry Gyroscopic Fidget Rings is a winner in the Made with Math Contest contest
- mjdargen's entry Gyroscopic Fidget Rings is a finalist in the Made with Math Contest contest
- mjdargen entered Animal Crossing Music Player in the Hour of Code Speed Challenge contest
- mjdargen commented on mjdargen's instructable Gyroscopic Fidget Rings
- mjdargen commented on mjdargen's instructable Gom Jabbar From DuneView Instructable »
Yes, it could be done with an ATtiny85. However, that was not the goal of this project. This project was meant to be an accessible, entry-level project for folks using a Raspberry Pi to learn coding with Python and allow for easier audio output. And yes, the Gom Jabbar is the needle that is actuated by a servo on the front of the box as referred to in the article.
- mjdargen commented on mjdargen's instructable Easy Machine Learning & Object Detection With Teachable MachineView Instructable »
The one line you may have to change is the line below. The argument to the VideoCapture method tells OpenCV which video capture device you want to use. Typically, 0 is going to be your computer's native webcam. Try changing it to 1 and see if the feed from your USB webcam appears. If it is still not working, try iterating through different values until you find the correct one. Best of luck! # instantiate video capture object cap = cv2.VideoCapture(0)
- mjdargen's instructable Gom Jabbar From Dune's weekly stats:
- mjdargen's instructable Gyroscopic Fidget Rings's weekly stats:
- mjdargen entered Gyroscopic Fidget Rings in the Made with Math Contest contest
- mjdargen entered Gom Jabbar From Dune in the Halloween Contest contest
- mjdargen's entry Infinity Cube in Fusion 360 is a winner in the Plastic Challenge contest
- mjdargen's entry Infinity Cube in Fusion 360 is a finalist in the Plastic Challenge contest
- mjdargen's instructable Infinity Cube in Fusion 360's weekly stats:
- mjdargen commented on mjdargen's instructable Infinity Cube in Fusion 360View Instructable »
Glad you got it to work! Thanks for checking it out!
- mjdargen commented on mjdargen's instructable Infinity Cube in Fusion 360View Instructable »
Glad it worked for you! Thanks for checking it out!
- mjdargen entered Infinity Cube in Fusion 360 in the Plastic Challenge contest
- mjdargen commented on mjdargen's instructable Easy Machine Learning & Object Detection With Teachable MachineView Instructable »
It is very hard to tell what the issue is without more information. I would assume it is how you are describing the new path to your model. Where is the model in relation to the tm_obj_det.py script? What did labels_path and model_path to be?Try unzipping the model and place it in a folder in the same directory as the Python script. Name the folder "my_model". Then what you can do is update labels_path and model_path to be as shown below:labels_path = f"{DIR_PATH}/my_model/labels.txt"model_path = f"{DIR_PATH}/my_model/keras_model.h5"Best of luck! Hope it works!
- mjdargen commented on mjdargen's instructable RPi Easy Object Detection - La Croix Flavor DetectorView Instructable »
Sorry for the misunderstanding! Recognizing multiple objects in a single frame is rather difficult using the Teachable Machine image models. An easy workaround for that would be to train a class that had both objects in the image. For example, if I was training a model to recognize a banana and an apple, I could create 4 different classes: one for the background, one for the banana, one for the apple, and one for both the banana and apple. That way, it would recognize both in a single frame.The better, but slightly more difficult option would be to create multiple models. Running multiple models would require some modification of the code to allow you to toggle back and forth between the models. You would need to create and initialize each model you planned on using in the program. OpenCV…
see more » - mjdargen commented on mjdargen's instructable RPi Easy Object Detection - La Croix Flavor DetectorView Instructable »
If you are asking if you can detect multiple objects in a single program, then yes! In the example I have written up, the program detects 7 different types of objects (the various flavors of La Croix). You will follow the same steps to create and use the model.To create your model in Teachable Machine, create a class for each type of object that you want to detect. These objects can be anything! Just make sure you capture enough images so the model can successfully recognize the difference between objects. Always test your model in Teachable Machine before exporting it for use in your Python program to ensure it correctly detects the objects. Thanks for checking out the project!Yes you can detect multiple objects by following
- mjdargen commented on mjdargen's instructable Easy Machine Learning & Object Detection With Teachable Machine
- mjdargen commented on mjdargen's instructable Making Art, Games, and More With Pi and PythonView Instructable »
Thanks!
- mjdargen entered Making Art, Games, and More With Pi and Python in the Pi Day Speed Challenge contest
- mjdargen commented on mjdargen's instructable RPi Easy Object Detection - La Croix Flavor DetectorView Instructable »
Not a problem! Glad it worked for you!
- mjdargen commented on mjdargen's instructable RPi Easy Object Detection - La Croix Flavor DetectorView Instructable »
That is great! That means OpenCV is successfully installed inside your virtual environment. Make sure that you activate your virtual environment and then run the Python script inside of that virtual environment by calling "python3 tm_obj_det.py" from the terminal. You know that you are successfully inside of the virtual environment if you see (TMenv) in your terminal.I just tried it from scratch again on my end and everything worked properly. Hopefully, it will work for you.
- mjdargen commented on mjdargen's instructable RPi Easy Object Detection - La Croix Flavor DetectorView Instructable »
So that means that you have not installed (or it cannot find) OpenCV. Did you run the installation script? Were there any error messages when you executed the installation script? The installation script installs the Python packages inside of a Python virtual environment meaning that you can only see these packages when the virtual environment is activated.To make sure OpenCV installed properly in the virtual environment, navigate to the directory where the virtual environment was created and run the command "source TMenv/bin/activate" to activate the virtual environment. Once you've done that, type "pip3 list" to list all Python packages installed. You should see "cvlib" and "opencv-python" in the list.If you see those, that means OpenCV was proper…
see more » - mjdargen commented on mjdargen's instructable RPi Easy Object Detection - La Croix Flavor DetectorView Instructable »
Thanks for following up! Glad you were able to get it working! The reaction time of the video is just a factor of how much compute power your Raspberry Pi has. Image detection is pretty computationally intensive. For example, my RPi 3 is quite laggy while my RPi4 with 4GB of RAM is pretty close to real time. A Coral USB Accelerator would definitely help provide more computational power to your Pi and speed up the program. Best of luck!
- mjdargen commented on mjdargen's instructable RPi Easy Object Detection - La Croix Flavor DetectorView Instructable »
You are likely getting this error because you are not running the code inside of the virtual environment. The installation script creates a virtual environment called TMenv in which it installs all of the packages. If you do not activate the virtual enviroment each time, you will not be able to access packages such as Tensorflow. I did this so it would not pollute your default Python environment.On another note, I just updated the installation script to mitigate some issues with an older version of Tensorflow. I would pull the updates so you can use Tensorflow 2.4.0 and avoid some of the issues that others ran into.
- mjdargen's instructable KK Slider Deepfake's weekly stats:
- mjdargen commented on mjdargen's instructable RPi Easy Object Detection - La Croix Flavor DetectorView Instructable »
Awesome! Glad you were able to get it working. Thanks for providing the update.
- mjdargen entered KK Slider Deepfake in the Anything Goes Contest contest
- mjdargen commented on mjdargen's instructable Arduino DoorbellView Instructable »
If you are hearing a single tone, that means you are using an active buzzer and not a passive buzzer. Active buzzers have internal circuitry and just need a DC signal to emit a single frequency. You can't change the frequency of the tone as that is controlled by the internal circuitry. You want to use a passive buzzer which requires a pulse signal at certain frequencies to generate a tone. This will allow you to use the tone() function in the code to play the songs.
- mjdargen's instructable Gform2adafruitIO: Automatic Marquee Driven by Google Form/Adafruit IO's weekly stats:
- mjdargen commented on mjdargen's instructable Easy Machine Learning & Object Detection With Teachable MachineView Instructable »
That is odd. It has worked for others and all of the other computers I have tried it on. You can try installing "pip install opencv-contrib-python" to see if that fixes the issue. You have been trying to run the YOLO object detection algorithm. Have you tried to see if the Teachable Machine object detection algorithm works?
- mjdargen commented on mjdargen's instructable Easy Machine Learning & Object Detection With Teachable Machine
Activate your virtual environment and type "pip list". Does it show opencv-python as installed? If it's not installed, try it again. You could also try installing "pip install opencv-contrib-python" if that doesn't work.
Bummer. For some reason, it seems like your machine does not have support for TensorFlow. That is why the original installation script did not work.What is the make and model of your PC? I would try searching online for solutions to see if anyone has found any workaround solutions to install TensorFlow on your specific machine. If you send me the information, I can try to look around as well.
What did it say when you tried to install openCV?
View Instructable »Yeah, it seems like it should be supported by that machine. The best thing I can recommend is uninstalling your current version of Python and try reinstalling Python 3.7.6. Make sure you select custom installation and check all of the boxes. Then try running the installation script again. Hopefully that helps and there was just some issue with your first Python installation.
- mjdargen commented on mjdargen's instructable Easy Machine Learning & Object Detection With Teachable Machine
I thought that's what you had been doing. First, make sure pip is up to date by running "pip install --upgrade pip". Try installing TensorFlow in the virtual environment by saying "pip install tensorflow==2.0.0". If that doesn't work, try installing TensorFlow outside of the virtual environment by deactivating the environment and saying "pip install tensorflow==2.0.0".If those two things don't work, you can specify the direct location of the package from Google. Run "python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-2.1.0-cp37-cp37m-win_amd64.whl" in your virtual environment. If that doesn't work, try it again outside of the virtual environment. If none of that works, try and send me a copy of the …
see more »View Instructable »Ahhhh... I believe we just found your issue. It looks like there is not a TensorFlow distribution for your operating system distribution. In the message you received, it lists the supported versions as "none". If there were supported versions for your operating system, it would list out all the version numbers "(from versions: 1.13.1, 1.13.2, 2.0.0, etc....)". See the attached image for when I try to install version 7.0.0 (which doesn't exist) on my system. It shows a list of all of the supported TensorFlow versions for my system. What operating system and version of Python are you running? We may be able to find a workaround solution to install it.
- mjdargen commented on mjdargen's instructable Easy Machine Learning & Object Detection With Teachable MachineView Instructable »
Hmm. Try activating your virtual environment, then running the command "pip install tensorflow==2.0.0". Make sure you are in your virtual environment. It should say the virtual environment name in parenthesis at the beginning of the line in your terminal: (TMenv). Let me know if that works or if you get any specific error messages.
- mjdargen commented on mjdargen's instructable Easy Machine Learning & Object Detection With Teachable MachineView Instructable »
Thanks! The installation script only installs the packages (numpy, tensorflow, and others) into your virtual environment. I did this in an effort to avoid polluting your standard Python environment with package versions you might not need for other programs.To use those packages, you will need to activate your virtual environment. You should then be able to type "pip list" and see the list of packages installed in your virtual environment. Let me know if that doesn't work and I can try to help you out some more! You may need to run the installation script again and monitor the messages to see if there are any specific errors I can help you with. Thanks for checking out the project!
- mjdargen commented on mjdargen's instructable Easy Machine Learning & Object Detection With Teachable MachineView Instructable »
Thanks for checking out my project. Did you run the full installation script? The installation script installs TensorFlow into a Python virtual environment on your machine. Make sure you select the installation script for your operating system and make sure that you activate your virtual environment before trying to run the Python script.To make sure TensorFlow is installed correctly in your virtual environment, open up a terminal and navigate to the location where your virtual environment was created ("cd ~/Documents/Teachable-Machine-Object-Detection" or wherever). Activate your virtual environment ("source TMenv/bin/activate" for Mac/Linux OR"TMenv/Scripts/activate" for Windows). Then run "pip list" or "pip3 list" to view all of the dif…
see more » - mjdargen's instructable RPi Easy Object Detection - La Croix Flavor Detector's weekly stats:
- mjdargen's instructable Easy Machine Learning & Object Detection With Teachable Machine's weekly stats:
- mjdargen commented on mjdargen's instructable La Croix Flavor Detector - Easy Object Detection on Raspberry PiView Instructable »
Thanks so much! I am really happy to hear the installation script worked well for you. It took me a long time to work out all the kinks in the installation steps, but I was determined to get it right so I could easily replicate the environment for myself!Glad you were able to get it working with your camera. I was using an older V1.3 which has a different size and aspect ratio. Hope you're able to make some cool stuff now that you have the environment all set up on your Raspberry Pi!
- mjdargen commented on mjdargen's instructable Battle of the Bands: Theremin, Organ, & APC Synthesizer!View Instructable »
Thanks! And thank you for sharing this. That's a really cool gizmo and a great way to visualize how a 555 timer works.
- mjdargen commented on mjdargen's instructable Battle of the Bands: Theremin, Organ, & APC Synthesizer!View Instructable »
Glad you enjoyed it! Thanks for sharing your project. Maybe as my students advance a little more, we can play around with something like you discussed!
- mjdargen's instructable Battle of the Bands: 555 Timer Edition's weekly stats:
- mjdargen entered Battle of the Bands: 555 Timer Edition in the Instrument Contest contest
- mjdargen's instructable Dorkwave: Glitchy A/V "Mixer"'s weekly stats:
- mjdargen commented on mjdargen's instructable Dorkwave: Glitchy A/V "Mixer"
- mjdargen entered Dorkwave: Glitchy A/V "Mixer" in the Instrument Contest contest
- mjdargen entered Arduino Doorbell in the First Time Author Contest contest