I bought a raspberry Pi 4, and tried to replace my PC>:<

Since I got a RP4 8GB from microcenter with a fan case, I tried to use it to replace pc for daily use. Here I shared my searching results if you are interested.

I have another RP3 which I used as NAS to share contents in my USB HDD through network

OS system: Ubuntu server arm version installed in RP3 which is used as SMB sever. So that all the devices connect to same router can access documents and video stored in the USB hard Disk. Raspberry PI OS 32bit installed in RP4. I didn’t use 64bit due to lack of DRM support for Netflix or Hulu which are necessary to my family.

Enable Smb service on RP3: How to Setup a Raspberry Pi Samba Server – Pi My Life Up. Remember to add service to startup: sudo systemctl restart smbd.

Overclock for RP4: By default, RP4 only has 1.5Ghz. We can easily overlock it up to 2.147Ghz by editing /boot/config.txt. Remember! You have to attach a fan to your RP4. How to Safely Overclock your Raspberry Pi 4 to 2.147GHz – Latest open tech from seeed studio

over_voltage=8
arm_freq=2147
gpu_freq=750

Handle DRM: Netflix and hulu need DRM which is not default in chromium. but we have work around to install chromium media edition which enabled DRM. How to Stream Netflix, Fix YouTube on Raspberry Pi | Tom’s Hardware

curl -fsSL https://pi.vpetkov.net -o ventz-media-pi
sh ventz-media-pi

Enable GPU Acceleration for Chromium: First of all, we need to use raspi-config to increase GPU memory to at least 128GB. Then follow the article next to enable each option. Raspberry Pi 4: Hardware accelerated video decoding (GPU) in Chromium – LeMaRiva|tech . If you watch YouTube, you’d better install plug-in “h264ify” in chromium to force stream h264 rather than v9 to decrease CPU utilization.

After enable GPU Acceleration, you can type chrome://GPU to check the results.

HDMI Audio output: In /boot/config.txt, find HDMI_Drive, change value to 2.

Other Settings: It is better to enable SSH and VNC if you need to remote control RP. The setting you can find through command raspi-config or raspberry configuration in menu.

Other Apps: VS Code – works; Teams – Only Browser; Zoom – Only Browser, and if too many people in meeting, it would be very slow; Remmina (RDP remote client) – works. VLC( media player) – 4k works; Spotify – only Browser.

bottom line:

would I use it for works? – NO. I would suggest apple M1

would I use it for play movie or surfing? – Yes. At least, no problem to watch Netflix or YouTube. (1080p)

Raspberry PI Security

Lots of ready-to-use opensource project can be found on internet for raspberry PI object detection. Most of them can do very well to motion detection or object classification. I am thinking how to merge them together to make a practical security system that can help all of us to make our home safety. Since It is open source, I will share my design, source code and project milestone. ( mostly to push myself to finish it eventually 🙂

Design:

  1. start camera to capture each frame
  2. save the first frame as reference. and this reference frame will be replaced every 5 mins when there is no movement detected.
  3. continuously compare the current frame with the reference frame.
  4. if any movement detected, draw some interesting areas.
  5. loop these interesting areas, if its size out of threshold, move it to next DNN network.
  6. use DNN network to classify the object.
  7. if object is human, trigger dedicated process “Event process”. includes, recording video, send notification and make speaker noise.
  8. loop to the next frame.

Milestone:

Oct 10th-15th: finish basic function to detect movement, recording video and send mail.

Oct 16th-22th: add DNN network

Oct 22th-30th: add speaker and integration test.

Potential update:

  • GPU accelerate on Cuda device
  • GUI
  • restful API

Source:

https://github.com/neoaksa/raspiberry-security

Demo(till Oct 15th):

Reference:

Deep learning: How OpenCV’s blobFromImage works. https://www.pyimagesearch.com/2017/11/06/deep-learning-opencvs-blobfromimage-works/

Raspberry Pi: Deep learning object detection with OpenCV. https://www.pyimagesearch.com/2017/10/16/raspberry-pi-deep-learning-object-detection-with-opencv/

how to install opencv on the raspberry pi 3 Model b+ (with camera) https://pysource.com/2018/10/31/raspberry-pi-3-and-opencv-3-installation-tutorial/

Home surveillance and motion detection with the Raspberry Pi, Python, OpenCV, and Dropbox. https://www.pyimagesearch.com/2015/06/01/home-surveillance-and-motion-detection-with-the-raspberry-pi-python-and-opencv/

Hello world!

Well. I have to agree “Hello world” is one of my favor titles. Since I bought a raspberry pi which supposed to do some deep learning works, like object detection, I have to do something before my camera coming from amazon.

So, I guess creating a pro personal website would be a good choice. I refer “Build a LAMP Web Server with WordPress”  and “offcial website“. In an nutshell, not hard stuffs, but some points need to be care.

Installation:

    1.  if you change password through mySQL directly, you have to transfer pwd through MD5 tool, here is one.
    2. if you happen to unable to upload file, please install “sudo apt-get install php7.0-gd” and restart apache “sudo service apache2 restart“.
    3. I initially started with offical website guide, but I suddenly realized I need to install LAMP(Linux, ApacheMySQLPHP)
    4. There might be requests for setting FTP when installing plugins, this can be solved by edit wp-config.php with adding “define(‘FS_METHOD’, ‘direct’);
    5. Give www-data authority to access wordpress folder: “sudo chown -R www-data:www-data /var/www/html“, /var/www/html is my wordpress folder

Backup:

  1. UpdraftPlus would be a good choice which provides several romote storage methods inculding google dirve.

After almost 2 hours mess around, I finally  create this website on raspberry!