Thursday, March 23, 2023

Jetson Nano and Tensorflow

 

 

https://developer.download.nvidia.com/compute/redist/jp/v44/tensorflow/

tensorflow 1.15.x to 2.3.x 

https://developer.download.nvidia.com/compute/redist/jp/v45/tensorflow/

tensorflow 1.15.x to 2.5.0 

https://developer.download.nvidia.com/compute/redist/jp/v46/tensorflow/

tensorflow 1.15.x to 2.6.2(requires of h5py==3.1.0 and it requires pkconfig)

https://developer.download.nvidia.com/compute/redist/jp/v461/tensorflow/ 
tensorflow 2.7.x
 

Compatibility

tensorflow 2.5.0 requires numpy~=1.19.2

Under Python 3.6.9 (protobuf requires Python '>=3.7' but the running Python is 3.6.9)
 
 
Under Python 3.6.9 (protobuf requires Python '>=3.7' but the running Python is 3.6.9)

 
 
 
Change OS in Jetson
Download image and tool for write img 
https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write
 
dd if=/path/to/your/isofile of=/your/usb/disk bs=8M status=progress
  
 
 
 

Tensorflow using virtual environments

Tensorflow 2.6(Current version 2.11 at 2023-03-23)

$ sudo apt-get install python3-venv

$ python3 -m venv envtf26

$ source envtf26/bin/activate

(envtf26) cloud@AsusDesktop:~/Gaia$
 


(envtf26) cloud@AsusDesktop:~/Gaia$ pip list  
Package       Version
------------- -------
pip           20.0.2  
pkg-resources 0.0.0   
setuptools    44.0.0

(envtf26) cloud@AsusDesktop:~/Gaia$ pip install tensorflow==2.6


(envtf26) cloud@AsusDesktop:~/Gaia$ pip install --upgrade protobuf==3.20


(envtf26) cloud@AsusDesktop:~/Gaia$ pip install keras==2.6

(envtf26) cloud@AsusDesktop:~/Gaia$ python3           
Python 3.8.10 (default, Mar 13 2023, 10:26:41)  
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf      
>>> print(tf.keras.__version__)  
2.6.0


(envtf26) cloud@AsusDesktop:~/Gaia$ pip install matplotlib==3.6 #if you install without 3.6 will install 3.7 and it will break tensorflow installation

References:

[1] matplotlib compa https://matplotlib.org/stable/devel/min_dep_policy.html








Wednesday, March 22, 2023

Houdini Repositories

 

 

host: ftp.sidefx.com

Houdini5.5 to Houdini19.5 Installers (Windows.exe/Linux.tar.gz/Macosx.dmg)




Jetson Nano installation

 

Installing cuda11 in Jetson Nano [1]. All instructins works, but doesn't run on it. Better is cuda10.

 

[1] https://jfrog.com/connect/post/installing-cuda-on-nvidia-jetson-nano/

 

 

Errors:

The following packages have unmet dependencies

...
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Fix:

sudo apt-get -o dpkg::Options::="--force-overwrite" install --fix-broken

 

Tuesday, March 21, 2023

Python and OpenCV issues

Error:

   import cv2, numpy as np,time
 File "/home/fincahuanaco/.local/lib/python3.7/site-packages/cv2/__init__.py", line 3, in <module>
   from .cv2 import *
ImportError: numpy.core.multiarray failed to import

 

Solution:

$ python3 -m pip install opencv-python==4.0.0.21

$ python3 -m pip list  
 

opencv-python          4.0.0.21

numpy                  1.15.0

 

Other combinations

opencv_python==4.4.0.46 and numpy==1.19.3 works.

 

Saturday, March 18, 2023

AWS Python issues

$ curl -O https://bootstrap.pypa.io/get-pip.py
$ python3 get-pip.py --user
 

References:

[1] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install-linux.html

 

AWS Common commands

 

Without ifconfig command

public IP

$ curl ifconfig.me

private IP

$ ip addr 

References:

[1] https://opensource.com/article/18/5/how-find-ip-address-linux

Friday, March 17, 2023

Vocal Remover

 

[1] AI Vocal Remover and Isolation https://vocalremover.org/

[2] AI Vocal remover, it split in to tracks https://multimedia.easeus.com/vocal-remover/    #2024

 

Tuesday, February 28, 2023

ffmpeg: Extract audio and reinsert a new for use in whatsapp

 

#Extract audio

ffmpeg -i mad-pi.mp4 -map 0:a:0 mad-pi_audio.wav 

 

#Extract reinsert new audio

ffmpeg -i mad-pi.mp4 -i mad-pi_audiohd.mp3 -c:v copy -map 0:v:0 -map 1:a:0 new.mp4
 

#reencode for whatsapp

ffmpeg -i new.mp4 -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p working.mp4

 

Friday, February 17, 2023

Python tools for Web Developers

 

[1] FastAPI https://fastapi.tiangolo.com/

[2] Dash Python https://dash.plotly.com/background-callbacks

 

Wednesday, February 15, 2023

Ringtones: Download mp3

 

 

Resources:

[1] Easy download https://mp3-ringtone.com/

[2] Play and using FireBug download https://www.zedge.net/find/ringtones/2023


Monday, February 13, 2023

ffmpeg: Extract mp3 from video

 

 ffmpeg -i mad-principio_peter.mp4 -vn -y out1.mp3 #9M

 

ffmpeg -i mad-principio_peter.mp4 -f mp3 -ab 192000 -vn out2.mp3 #14M

ffmpeg -i mad-principio_peter.mp4 -f mp3 -ab 128000 -vn out3.mp3 #9M
ffmpeg -i mad-principio_peter.mp4 -vn -acodec libmp3lame out4.mp3 #9M

ffmpeg -i mad-principio_peter.mp4 -acodec libmp3lame -ab 128k out5.mp3 #9M

ffmpeg -i gym.mp4 -f webm -c:v libvpx -b:v 1M -acodec libvorbis gym.webm -hide_banner

Second

ffmpeg -i sample.avi -q:a 0 -map a sample.mp3  #complete
ffmpeg -i sample.avi -ss 00:03:05 -t 00:00:45.0 -q:a 0 -map a sample.mp3 #fraction
Parameters :
-q:a 0 for variable bit rate
-ss starting timestamp
-t  the encoding time (If you don't specify, it will go to the end)
-map 0:a:3 selects audio stream #4 (ffmpeg starts counting from 0) 
** specific the timestamps in HH:MM:SS.xxx format.

 

References:

[1] https://json2video.com/how-to/ffmpeg-course/ffmpeg-extract-audio.html

Running apps

Runtastic (I uninstalled because force to update your device - Internet connection problems) Runkeeper  (Wrong GPS tracking) Strava   (Curr...