1 2 3 | export CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=ON" apt-get install libprotobuf-dev protobuf-compiler pip install onnx -i https://pypi.tuna.tsinghua.edu.cn/simple |
技术
MacOs 3d presentation in VMWare
Although VMWare can't support hardware accelerated 3d rendering for macos, I happened to see Garageband running in my old laptop, it indicates 'macOS Catalina (Version 10.15.4)' supports middle layer OpenGL software simulation, while up-to-date macOS deviates from this style.
CMake Qt::Core
In a CMakeLists.txt, a standard name for a Qt component is like Qt6::Core or Qt5::Core. But we should see some projects' CMakeLists.txt contains like Qt::Core, it's a technology for generalization. However, the Qt where we can use this technic must be above Qt 5.15!
refer to:
https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html
Build GStreamer in Windows
1 2 3 4 5 6 7 8 9 10 11 12 | python -m pip install meson python -m pip install ninja git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git cd gstreamer rd /S /Q build meson --buildtype=release -Dprefix=%CD%/installed -Dlibav=enabled -Dgst-plugins-ugly:x264=enabled -Dgst-plugins-bad:nvcodec=enabled build meson compile -C build meson install -C build |
refer to:
https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html
http://dljz.nicethemes.cn/news/show-62582.html
https://blog.csdn.net/yuwg_le/article/details/126147636
Deep learning memo
yolo pdf,
EfficientDet https://arxiv.org/pdf/2011.08036.pdf YOLOv1 https://arxiv.org/pdf/1506.02640.pdf YOLOv2 https://arxiv.org/pdf/1612.08242.pdf YOLOv3 https://arxiv.org/pdf/2011.08036.pdf https://pjreddie.com/media/files/papers/YOLOv3.pdf YOLOv4 https://github.com/AlexeyAB/darknet YOLOv4-Scaled https://github.com/WongKinYiu/ScaledYOLOv4 YOLO-PPv2 https://arxiv.org/pdf/2104.10419.pdf YOLOv5 https://arxiv.org/pdf/2104.10419.pdf YOLOX https://github.com/Megvii-BaseDetection/YOLOX YOLOR https://github.com/WongKinYiu/yolor YOLOF https://arxiv.org/pdf/2103.09460.pdf YOLOS https://arxiv.org/pdf/2106.00666.pdf YOLOP https://arxiv.org/pdf/2108.11250.pdf YOLOV6 https://mp.weixin.qq.com/s/RrQCP4pTSwpTmSgvly9evg https://github.com/meituan/YOLOv6 https://zhuanlan.zhihu.com/p/353697121 YOLOV7 https://arxiv.org/abs/2207.02696 https://github.com/WongKinYiu/yolov7 |
https://github.com/yael-vinker/CLIPasso
https://github.com/openai/CLIP
refer to:
AI有啥用
https://blog.csdn.net/PercentageC/article/details/126744534
Speed up pip install
1 2 3 4 5 6 7 8 9 | python3 -m pip install opencv-python==4.5.3.56 -i https://pypi.tuna.tsinghua.edu.cn/simple pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple http://mirrors.aliyun.com/pypi/simple/ https://pypi.mirrors.ustc.edu.cn/simple/ https://pypi.douban.com/simple/ https://pypi.tuna.tsinghua.edu.cn/simple/ http://pypi.mirrors.ustc.edu.cn/simple/ |
refer to:
https://www.cnblogs.com/huangguifeng/p/12002049.html
Chrome memo
To prevent inactive tab from using cpu resources, in address bar, visit
1 | chrome://discards |
toggle restless pages 'Urgent Discard' to grey under 'Actions' column.
chrome://flags#
enable-parallel-downloading enable-force-dark |
refer to:
https://www.askvg.com/tip-enable-tab-freeze-or-tab-suspend-feature-in-google-chrome/
https://blog.csdn.net/ythuiyi/article/details/113506238
Rendering mp4 video not silky, why?
The original HD mp4 file 'movie.mp4' plays very smoothly. I picked out the h264 stream saved as 'movie.264' from it, then using mp4v2 converted 'movie.264' to a new mp4 file 'output.mp4'. However, experience of watching 'output.mp4' was very bad. Why?
I debugged the 'ClipTrack' function in 'mp4v2/test/OLD/mp4clip.cpp', found a key argument 'renderingOffset' of function 'MP4WriteSample'. All examples searched from the web about writing h264 to mp4 through mp4v2 set 'renderingOffset' to 0, while in 'ClipTrack', 'renderingOffset' of the function 'MP4WriteSample' is directly set to the value from 'renderingOffset' of the function 'MP4ReadSample'.
Here we make a concept clear, the 'sample' entity in mp4 file format specification is equal to a frame which can completely rendering as a picture. A sample consists of several nalus, a nalu whose start code is 0x00, 0x00, 0x00, 0x01 indicates a new sample, while a nalu which starts with 0x00, 0x00, 0x01 is among a sample, and a sample needs not to be a IDR key frame.
Through carrying 'renderingOffset' value at beginning of each sample in 'movie.264', I did generate an 'output.mp4' which displays as smoothly as the original one.
Did 'renderingOffset' mean time stamp of a sample? No, at least not exactly. By watching log, I found its value was not increasing as time went by.
I continued debugging mp4v2, then saw a key word 'ctts' atom, and searched a link from the web,
https://blog.csdn.net/cheyo809775692/article/details/100924523
I now understand, the decoding order of h264 samples is slightly different from the rendering order of them.
For example, in stts atom,
1 2 3 4 5 | 'decoding order' 'sample count' 'sample duration' 1,2,3,4 4 20 5 1 40 6,7,8 3 20 9 1 60 |
in ctts atom,
1 2 3 4 5 6 7 8 | 'decoding order' 'sample count' 'sample offset' 1,2,3 3 20 4 1 40 5 1 0 6 1 40 7 1 0 8 1 40 9 1 0 |
final rendering timing is
1 2 3 | 'decoding order' 1 2 3 4 5 6 7 8 9 'duration' 20 20 20 20 40 20 20 20 60 'rending order' 1 2 3 5 5,4 7 6 9 9,8 9 |
Terms,
1 2 3 4 5 6 7 8 9 10 11 12 | mvhd: movie header tkhd: track header mdhd: media header stsd: sample descriptions stts: time to sample ctts: composition offset stss: sync sample offset stsc: sample to chunk stsz: sample size stco/stco64: chunk offset dts: decoding timestamp pts: presentation timestamp |
expect scp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | auto_scp() { local filepath=$1 expect -c " set timeout 10 spawn scp scp://someone@192.168.12.3:1234//home/someone/$filepath . expect \"password:\" send \"toodangerous\r\" interact " } |
refer to:
https://blog.csdn.net/f_zyj/article/details/93475830
https://zhuanlan.zhihu.com/p/25164676
Select Windows SDK version when building using cmake
Read cmake online doc carefully, https://cmake.org/cmake/help/latest/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.html
So when we build project which has CMakeLists.txt, we can select Windows SDK version in this way:
- In explorer, navigate to like C:\Program Files (x86)\Windows Kits\10\Include.
- For cmake always finds the newest version to build our project, we can just rename all sdk versions which is newer than we want. e.g. if we want 10.0.19041.0 to build our project, but 10.0.22581.0 is newer, we rename 10.0.22581.0 to 10.0.0.22581.0, the rule is among tokens split by period signs, the third token number is the key word that cmake sorts them to get the largest as newest.
- Start cmake to configure the project, it will find the right sdk version.
- After cmake is done in configuration, rename 10.0.0.22581.0 back to 10.0.22581.0.