### Install cuDNN 8.1 Samples Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/docs/install.md Installs cuDNN 8.1 runtime, developer, and samples libraries using dpkg. It then copies the samples to the home directory and compiles the mnistCUDNN example to verify the installation. ```bash # x.x.x表示下载的版本号 # $HOME为工作目录 sudo dpkg -i libcudnn8_x.x.x-1+cudax.x_arm64.deb sudo dpkg -i libcudnn8-dev_8.x.x.x-1+cudax.x_arm64.deb sudo dpkg -i libcudnn8-samples_8.x.x.x-1+cudax.x_arm64.deb # 验证是否正确安装 cp -r /usr/src/cudnn_samples_v8/ $HOME cd $HOME/cudnn_samples_v8/mnistCUDNN # 编译 make clean && make ./mnistCUDNN ``` -------------------------------- ### Install Python Requirements Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_avh/README.md Install the necessary Python libraries for the demo. Run this command from the directory containing the requirements.txt file. ```bash pip install -r ./requirements.txt ``` -------------------------------- ### Install LabelMe on Ubuntu Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/DetAnnoTools_en.md Installs LabelMe using apt-get, pip, or a standalone executable on Ubuntu systems. ```bash sudo apt-get install labelme # or sudo pip3 install labelme # or install standalone executable from: # https://github.com/wkentaro/labelme/releases ``` -------------------------------- ### Install PaddleDet Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/auto_compression/README.md Install the PaddleDet library for object detection models. ```shell pip install paddledet ``` -------------------------------- ### Install Paddle Serving Packages Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/serving/cpp/README.md Install the necessary Paddle Serving client, server, and application packages. Choose the appropriate server package (CPU or GPU) for your environment. Consider using a domestic mirror for faster downloads. ```commandline pip install paddle-serving-client # pip install paddle-serving-server # CPU pip install paddle-serving-server-gpu # GPU 默认 CUDA10.2 + TensorRT6,其他环境需手动指定版本号 pip install paddle-serving-app # pip install paddlepaddle # CPU pip install paddlepaddle-gpu ``` -------------------------------- ### Start Training and Evaluation Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/PrepareDetDataSet.md Execute this command to start training your model with the specified configuration and enable evaluation during training. Ensure CUDA is set if using GPU. ```bash export CUDA_VISIBLE_DEVICES=0 python tools/train.py -c configs/yolov3/yolov3_mobilenet_v1_roadsign.yml --eval ``` -------------------------------- ### Install VisualDL Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/QUICK_STARTED.md Installs VisualDL for real-time visualization of training metrics. Requires Python 3.5 or later. ```python python -m pip install visualdl -i https://mirror.baidu.com/pypi/simple ``` -------------------------------- ### Basic CMake Setup Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_ncnn/CMakeLists.txt Sets the minimum CMake version and C++ standard. Initializes the project name. ```cmake cmake_minimum_required(VERSION 3.9) set(CMAKE_CXX_STANDARD 17) project(picodet_demo) ``` -------------------------------- ### Install PaddlePaddle Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/auto_compression/README.md Install PaddlePaddle for CPU or GPU environments. ```shell # CPU pip install paddlepaddle # GPU pip install paddlepaddle-gpu ``` -------------------------------- ### Install PaddleDetection Dependencies and Package Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/INSTALL.md Installs the necessary dependencies for PaddleDetection using requirements.txt and then compiles and installs the PaddleDetection package itself. This should be run from the cloned PaddleDetection directory. ```shell cd PaddleDetection pip install -r requirements.txt python setup.py install ``` -------------------------------- ### Install ONNX Runtime Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/EXPORT_ONNX_MODEL.md Install the ONNX Runtime library for performing inference with ONNX models. ```bash pip install onnxruntime ``` -------------------------------- ### Install LabelImg on Ubuntu Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/DetAnnoTools_en.md Install necessary packages and dependencies for LabelImg on Ubuntu using apt-get and pip. ```bash sudo apt-get install pyqt5-dev-tools sudo pip3 install -r requirements/requirements-linux-python3.txt make qt5py3 python3 labelImg.py python3 labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE] ``` -------------------------------- ### Install VisualDL Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/logging_en.md Install the VisualDL library using pip. This is required for logging metrics to VisualDL. ```bash pip install visualdl ``` -------------------------------- ### YOLOv3 Configuration File Example Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/advanced_tutorials/MODEL_TECHNICAL_en.md This is an example of a general configuration file for YOLOv3, demonstrating how different modules like dataset, runtime, optimizer, network structure, and reader are included and can be overridden. ```yaml _BASE_: [ '../datasets/coco_detection.yml', # Dataset configuration file shared by all models '../runtime.yml', # Runtime configuration '_base_/optimizer_270e.yml', # Optimizer related configuration '_base_/yolov3_darknet53.yml', # yolov3 Network structure configuration file '_base_/yolov3_reader.yml', # yolov3 Reader module configuration ] # The relevant configuration defined here can override the configuration of the same name in the above file snapshot_epoch: 5 weights: output/yolov3_darknet53_270e_coco/model_final ``` -------------------------------- ### Install ONNX Prerequisites for Model Conversion Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_openvino/README.md Navigate to the model_optimizer directory and install the necessary requirements for ONNX model conversion. ```shell cd /openvino_2021/deployment_tools/model_optimizer cd ./install_prerequisites sudo install_prerequisites_onnx.sh ``` -------------------------------- ### Install Paddle2ONNX and ONNX Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/configs/rtdetr/README.md Install necessary libraries for converting models to ONNX format. ```shell pip install onnx==1.13.0 pip install paddle2onnx==1.0.5 ``` -------------------------------- ### Compile and Install Paddle from Source Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/docs/install.md Clones the PaddlePaddle repository, configures the build with specific options (MKL, GPU, distributed, Release, TensorRT), compiles it, and installs the GPU version. ```bash # 编译安装Paddle git clone https://github.com/PaddlePaddle/Paddle.git cd Paddle mkdir build && cd build cmake .. \ -DWITH_MKL=ON \ -DWITH_MKLDNN=ON \ -DWITH_GPU=ON \ -DWITH_DISTRIBUTE=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCUDA_ARCH_NAME=Auto \ -DPY_VERSION=3.7 \ -DON_INFER=ON \ -DWITH_TENSORRT=ON \ -DTENSORRT_ROOT=/usr/local/TensorRT6-cuda10.1-cudnn7 make -j 20 pip3.7 install python/dist/paddlepaddle_gpu-0.0.0-cp37-cp37m-linux_x86_64.whl cd ../.. ``` -------------------------------- ### Install LabelImg with Anaconda Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/DetAnnoTools_en.md Install LabelImg using Anaconda, including PyQt and lxml, and generate resource files. ```bash conda install pyqt=5 conda install -c anaconda lxml pyrcc5 -o libs/resources.py resources.qrc python labelImg.py python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE] ``` -------------------------------- ### Download and Unzip Data Example Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/PrepareDetDataSet_en.md Command to navigate to the dataset directory and download/unzip data, typically used for preparing custom datasets. ```bash # Downing and unziping data >>cd $(ppdet_root)/dataset ``` -------------------------------- ### Install Weights & Biases SDK Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/logging_en.md Install the wandb SDK and log in to your wandb account to use Weights & Biases for experiment tracking. ```bash pip install wandb wandb login ``` -------------------------------- ### Start Training with VisualDL Visualization Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/GETTING_STARTED_cn.md This command starts the training process for a YOLOv3 model and enables VisualDL for real-time monitoring of loss and mAP trends. Ensure CUDA_VISIBLE_DEVICES is set if using a GPU on Linux/Mac. ```bash export CUDA_VISIBLE_DEVICES=0 #windows和Mac下不需要执行该命令 python tools/train.py -c configs/yolov3/yolov3_mobilenet_v1_roadsign.yml --use_vdl=true \ --vdl_log_dir=vdl_dir/scalar \ ``` -------------------------------- ### Install LabelMe on macOS Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/DetAnnoTools_en.md Installs LabelMe using Homebrew and pip, or a command-line interface/app via Homebrew on macOS. ```bash brew install pyqt # maybe pyqt5 pip install labelme # or brew install wkentaro/labelme/labelme # command line interface # brew install --cask wkentaro/labelme/labelme # app # or install standalone executable/app from: # https://github.com/wkentaro/labelme/releases ``` -------------------------------- ### Install FreeImage Library Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/docs/install.md Installs the freeimage library, which may be required if the mnistCUDNN sample fails with freeimage-related errors. ```bash sudo apt-get install libfreeimage-dev sudo apt-get install libfreeimage ``` -------------------------------- ### Install PaddleSlim from Source Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/configs/slim/README_en.md Compile and install PaddleSlim from its source code. This method is useful for development or when specific build configurations are needed. ```shell git clone https://github.com/PaddlePaddle/PaddleSlim.git cd PaddleSlim python setup.py install ``` -------------------------------- ### Start LabelImg Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/DetAnnoTools_en.md Launch LabelImg using a Python script, optionally specifying an image path. ```bash python labelImg.py ``` -------------------------------- ### VOC Data Format: train.txt Example Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/PrepareDetDataSet_en.md This example illustrates the format of the 'train.txt' file, which lists the paths to training images and their corresponding annotation files. ```bash # train.txt is list of trainset >>cat train.txt ./images/xxx1.jpg ./annotations/xxx1.xml ./images/xxx2.jpg ./annotations/xxx2.xml ... ``` -------------------------------- ### Include Directories Setup Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_ncnn/CMakeLists.txt Adds necessary include directories for OpenCV, the current source directory, and the current binary directory. ```cmake include_directories( ${OpenCV_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) ``` -------------------------------- ### YOLOv3 Reader Configuration Example Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/advanced_tutorials/READER.md An example configuration for a YOLOv3 reader, defining worker number, sample transforms, batch transforms, batch size, shuffle, and drop_last settings for training, evaluation, and testing. ```yaml worker_num: 2 TrainReader: sample_transforms: - Decode: {} ... batch_transforms: ... batch_size: 8 shuffle: true drop_last: true use_shared_memory: true EvalReader: sample_transforms: - Decode: {} ... batch_size: 1 drop_empty: false TestReader: inputs_def: image_shape: [3, 608, 608] sample_transforms: - Decode: {} ... batch_size: 1 ``` -------------------------------- ### Build PicoDet Demo (Windows) Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_openvino/README.md Build the PicoDet demo application on Windows using CMake and MSBuild. Ensure OpenVINO environment variables are set. ```cmd \openvino_2021\bin\setupvars.bat mkdir -p build cd build cmake .. msbuild picodet_demo.vcxproj /p:configuration=release /p:platform=x64 ``` -------------------------------- ### CMake Build Configuration Example (No TensorRT) Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/cpp/docs/Jetson_build.md An example configuration for CMake build on Jetson, specifically disabling TensorRT integration. This setup is useful when TensorRT is not required or not available. ```bash # Whether to use GPU (i.e., use CUDA) WITH_GPU=ON # Whether to use MKL or openblas WITH_MKL=OFF # Whether to integrate TensorRT (only valid when WITH_GPU=ON) WITH_TENSORRT=OFF # TensorRT's include path TENSORRT_INC_DIR=/usr/include/aarch64-linux-gnu # TensorRT's lib path TENSORRT_LIB_DIR=/usr/lib/aarch64-linux-gnu # Paddle inference library path PADDLE_DIR=/home/nvidia/PaddleDetection_infer/paddle_inference/ # Paddle inference library name PADDLE_LIB_NAME=paddle_inference # Whether to compile the Paddle inference library using static libraries # When using TensorRT, Paddle's inference library is usually a dynamic library WITH_STATIC_LIB=OFF # CUDA lib path CUDA_LIB=/usr/local/cuda-10.0/lib64 # CUDNN lib path CUDNN_LIB=/usr/lib/aarch64-linux-gnu/ # Whether to enable keypoint model prediction function WITH_KEYPOINT=ON ``` -------------------------------- ### Prepare Data and Environment Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/docs/benchmark_train.md Run this script to prepare training data and install necessary environments. It takes a configuration file and a mode as arguments. ```shell bash test_tipc/prepare.sh test_tipc/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco_train_infer_python.txt benchmark_train ``` -------------------------------- ### CMake Build Configuration for Jetson Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/cpp/docs/Jetson_build.md Configure CMake variables for building the Paddle prediction library on Jetson. Ensure paths for TensorRT, Paddle inference library, CUDA, CUDNN, and OpenCV are correctly set according to your system setup. This example shows a configuration without TensorRT. ```bash # Whether to use GPU (i.e., use CUDA) WITH_GPU=ON # Whether to use MKL or openblas, TX2 needs to be set to OFF WITH_MKL=OFF # Whether to integrate TensorRT (only valid when WITH_GPU=ON) WITH_TENSORRT=OFF # TensorRT's include path TENSORRT_INC_DIR=/usr/include/aarch64-linux-gnu # TensorRT's lib path TENSORRT_LIB_DIR=/usr/lib/aarch64-linux-gnu # Paddle inference library path PADDLE_DIR=/path/to/paddle_inference/ # Paddle inference library name PADDLE_LIB_NAME=paddle_inference # Whether to compile the Paddle inference library using static libraries # When using TensorRT, Paddle's inference library is usually a dynamic library WITH_STATIC_LIB=OFF # CUDA lib path CUDA_LIB=/usr/local/cuda-10.0/lib64 # CUDNN lib path CUDNN_LIB=/usr/lib/aarch64-linux-gnu # Whether to enable keypoint model prediction function WITH_KEYPOINT=ON # OPENCV_DIR path # For Linux platforms, please download: https://bj.bcebos.com/paddleseg/deploy/opencv3.4.6gcc4.8ffmpeg.tar.gz2 and decompress it into the deps folder # For TX2 platforms, please download: https://paddlemodels.bj.bcebos.com/TX2_JetPack4.3_opencv_3.4.10_gcc7.5.0.zip and decompress it into the deps folder OPENCV_DIR=/path/to/opencv # Please check if all the above paths are correct # The following does not need to be changed cmake .. \ -DWITH_GPU=${WITH_GPU} \ -DWITH_MKL=OFF \ -DWITH_TENSORRT=${WITH_TENSORRT} \ -DTENSORRT_DIR=${TENSORRT_DIR} \ -DPADDLE_DIR=${PADDLE_DIR} \ -DWITH_STATIC_LIB=${WITH_STATIC_LIB} \ -DCUDA_LIB=${CUDA_LIB} \ -DCUDNN_LIB=${CUDNN_LIB} \ -DOPENCV_DIR=${OPENCV_DIR} \ -DPADDLE_LIB_NAME={PADDLE_LIB_NAME} \ -DWITH_KEYPOINT=${WITH_KEYPOINT} ``` -------------------------------- ### Install LabelMe with Anaconda Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/DetAnnoTools_en.md Installs LabelMe using Anaconda, creating a dedicated environment and installing necessary packages. ```bash conda create –name=labelme python=3 conda activate labelme pip install pyqt5 pip install labelme ``` -------------------------------- ### Install AutoLog for PaddleDetection Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/docs/install.md Clones the AutoLog repository, installs its requirements, builds the wheel, and then installs the wheel package. This is a dependency for PaddleDetection. ```bash # 安装AutoLog git clone https://github.com/LDOUBLEV/AutoLog cd AutoLog pip3.7 install -r requirements.txt python3.7 setup.py bdist_wheel pip3.7 install ./dist/auto_log-1.0.0-py3-none-any.whl # 下载PaddleDetection代码 cd ../ git clone https://github.com/PaddlePaddle/PaddleDetection ``` -------------------------------- ### Install PaddleDetection and TIPC Requirements Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/docs/test_train_inference_python.md Installs necessary dependencies for PaddleDetection and its TIPC testing framework. Ensure PaddlePaddle >= 2.2 is installed prior to running these commands. ```shell pip install -r ./requirements.txt pip install -r ./test_tipc/requirements.txt ``` -------------------------------- ### Run PicoDet Demo (Inference Video) Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_openvino/README.md Run the PicoDet demo to perform inference on a video file. Replace VIDEO_PATH with the actual path to your video file. ```shell picodet_demo 2 VIDEO_PATH ``` -------------------------------- ### Run PicoDet Demo (Benchmark) Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_openvino/README.md Run the PicoDet demo in benchmark mode to measure performance. The argument '0' typically indicates the device to use for benchmarking. ```shell picodet_demo 3 0 ``` -------------------------------- ### Verify PaddlePaddle Installation Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/INSTALL.md Commands to import PaddlePaddle and run a check to confirm a successful installation. Also includes a command to print the installed PaddlePaddle version. ```python >>> import paddle >>> paddle.utils.run_check() ``` ```python python -c "import paddle; print(paddle.__version__)" ``` -------------------------------- ### Build PicoDet Demo (Linux) Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_openvino/README.md Build the PicoDet demo application on Linux using CMake and make. Ensure OpenVINO environment variables are sourced. ```shell source /opt/intel/openvino_2021/bin/setupvars.sh mkdir build cd build cmake .. make ``` -------------------------------- ### Install pycocotools for Windows Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/INSTALL.md Provides an alternative installation command for pycocotools, specifically for Windows users where the default installation might fail. This version supports Python 3. ```shell pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI ``` -------------------------------- ### Run PicoDet Demo (Webcam) Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_openvino/README.md Run the PicoDet demo to perform inference on a live webcam feed. The first argument '0' indicates the webcam device. ```shell picodet_demo 0 0 ``` -------------------------------- ### Install Cython for Older Python Versions Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/INSTALL.md Installs the cython package, which may be required for pycocotools installation on Python versions 3.6 or earlier, to resolve potential Distutils errors. ```shell pip install cython ``` -------------------------------- ### Start Client to Access Serving Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/serving/cpp/README.md Initiate the client to send requests to the running prediction service. Provide the path to the serving client configuration, the image file for inference, and the HTTP port the server is listening on. ```commandline python deploy/serving/python/serving_client.py --serving_client output_inference/yolov3_darknet53_270e_coco/serving_client --image_file demo/000000014439.jpg --http_port 9997 ``` -------------------------------- ### Install AutoLog for Standardized Logging Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/docs/test_train_inference_python.md Clones the AutoLog repository, installs its dependencies, builds the wheel, and then installs the wheel package. This tool is used for normalizing log output during TIPC tests. ```shell git clone https://github.com/LDOUBLEV/AutoLog cd AutoLog pip install -r ./requirements.txt python setup.py bdist_wheel pip install ./dist/auto_log-1.0.0-py3-none-any.whl ``` -------------------------------- ### Start Paddle Serving Service (CPU) Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/serving/README.md Launches the Paddle Serving server on CPU. Ensure the model files are in the current directory. ```python cd output_inference/yolov3_darknet53_270e_coco/ # CPU python -m paddle_serving_server.serve --model serving_server --port 9393 ``` -------------------------------- ### Install MNN Python Library Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_mnn_kpts/README.md Install the MNN Python library using pip. ```shell pip install MNN ``` -------------------------------- ### YOLOv5 FPGM Quantization Training Configuration Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/configs/yolov5/yolov5_l_300e_coco_train_infer_python.txt Start training with FPGM quantization. This command uses the base configuration and a specific slim configuration for FPGM. ```bash tools/train.py -c configs/yolov5/yolov5_l_300e_coco.yml --slim_config _template_fpgm -o ``` -------------------------------- ### Start Docker Image for Paddle Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/docs/install.md Launches a Docker container with the PaddlePaddle image, mapping the current directory to /paddle. This is the recommended way to set up the environment. ```bash # 启动docker镜像 nvidia-docker run --name paddle -it -v $PWD:/paddle paddlepaddle/paddle:latest-gpu-cuda10.1-cudnn7-gcc82-dev /bin/bash cd /paddle ``` -------------------------------- ### Install PaddleYOLO Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/README_en.md Clone the repository and install dependencies. Requires Python 3.7.0+ and PaddlePaddle 2.3.2+. ```bash git clone https://github.com/PaddlePaddle/PaddleYOLO # clone cd PaddleYOLO pip install -r requirements.txt # install ``` -------------------------------- ### PicoDet Training Configuration Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/benchmark_train.txt This snippet shows the command to start a normal training process for the ppyolo_mbv3_large_coco model using a configuration file. ```bash tools/train.py -c configs/ppyolo/ppyolo_mbv3_large_coco.yml -o ``` -------------------------------- ### Start Training with Custom Configuration Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/advanced_tutorials/customization/detection_en.md Execute the training script with your modified configuration file. The --eval flag enables evaluation during training. ```bash export CUDA_VISIBLE_DEVICES=0 python tools/train.py -c configs/yolov3/yolov3_mobilenet_v1_270e_coco.yml --eval ``` -------------------------------- ### Run Demo with Local FVP Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_avh/README.md Run the demo application on local Fixed Virtual Platforms (FVPs) by specifying the --enable_FVP argument. This is an alternative to using the Arm Virtual Hardware AMI instance. ```bash ./run_demo.sh --enable_FVP 1 ``` -------------------------------- ### Install ADB on macOS Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/lite/README.md Install the Android Debug Bridge (ADB) tool on macOS using Homebrew. ```shell brew cask install android-platform-tools ``` -------------------------------- ### Start Paddle Serving Service (GPU) Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/serving/README.md Launches the Paddle Serving server on a GPU. Ensure the model files are in the current directory. ```python cd output_inference/yolov3_darknet53_270e_coco/ # GPU python -m paddle_serving_server.serve --model serving_server --port 9393 --gpu_ids 0 ``` -------------------------------- ### Install PaddleDetection Dependencies Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/docs/install.md Navigates into the PaddleDetection directory and installs its required Python packages using the requirements.txt file. ```bash cd PaddleDetection pip3.7 install -r ./requirements.txt ``` -------------------------------- ### Configure PicoDet Demo for Inference Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_openvino/README.md Edit the main.cpp and picodet_openvino.h files to set the image size and the path to the OpenVINO model weights. ```c++ step1: main.cpp #define image_size 416 ... auto detector = PicoDet("../weight/picodet_m_416.xml"); ... step2: picodet_openvino.h #define image_size 416 ``` -------------------------------- ### Run PicoDet Demo (Inference Images) Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_openvino/README.md Run the PicoDet demo to perform inference on a batch of images located in a specified folder. Replace IMAGE_FOLDER with the actual path to your images. ```shell picodet_demo 1 IMAGE_FOLDER/*.jpg ``` -------------------------------- ### Install LabelImg on macOS Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/DetAnnoTools_en.md Install LabelImg on macOS using Homebrew or pip, including Qt and lxml dependencies. ```bash brew install qt # Install qt-5.x.x by Homebrew brew install libxml2 or using pip pip3 install pyqt5 lxml # Install qt and lxml by pip make qt5py3 python3 labelImg.py python3 labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE] ``` -------------------------------- ### Edit Main C++ File for Demo Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_openvino_kpts/README.md Update the `main.cpp` file to set the image size, initialize the image matrix, define center and scale, and specify the paths to the downloaded OpenVINO models for PicoDet and TinyPose. ```cpp #define image_size 416 ... cv::Mat image(256, 192, CV_8UC3, cv::Scalar(1, 1, 1)); std::vector center = {128, 96}; std::vector scale = {256, 192}; ... auto detector = PicoDet("../weight/picodet_m_416.xml"); auto kpts_detector = new KeyPointDetector("../weight/tinypose256.xml", -1, 256, 192); ... ``` -------------------------------- ### Install PaddleSlim via pip Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/configs/slim/README_en.md Install PaddleSlim directly using pip. This is the simplest method for adding PaddleSlim to your project. ```shell pip install paddleslim -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -------------------------------- ### Run the Demo Application Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_avh/README.md Execute the main script to run the bare metal text recognition application. This command initiates the demo process. ```bash ./run_demo.sh ``` -------------------------------- ### Train a Model with Compression Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/configs/slim/README_en.md Start the training process for a model, applying specified compression configurations. Ensure you have both the model configuration and the slim configuration files ready. ```shell python tools/train.py -c configs/{MODEL.yml} --slim_config configs/slim/{SLIM_CONFIG.yml} ``` -------------------------------- ### PicoDet Quantized Training Configuration Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/test_tipc/benchmark_train.txt This command initiates training with quantization-aware training (QAT) for the ppyolo_mbv3_large_coco model, utilizing a specific slim configuration. ```bash tools/train.py -c configs/ppyolo/ppyolo_mbv3_large_coco.yml --slim_config configs/slim/quant/ppyolo_mbv3_large_qat.yml -o ``` -------------------------------- ### Install PaddlePaddle CPU version Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/INSTALL.md Installs the CPU-only version of PaddlePaddle, version 2.3.2. This is suitable for environments without a compatible GPU. ```shell python -m pip install paddlepaddle==2.3.2 -i https://mirror.baidu.com/pypi/simple ``` -------------------------------- ### Install ADB on Linux Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/lite/README.md Install the Android Debug Bridge (ADB) tool on Linux systems using apt package manager. ```shell sudo apt update sudo apt install -y wget adb ``` -------------------------------- ### Install Paddle Lite with pip Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/lite/README.md Install the Paddle Lite library using pip. This is the recommended method for obtaining the paddle_lite_opt tool. ```shell pip install paddlelite ``` -------------------------------- ### Run TinyPose MNN Demo for Benchmark Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/deploy/third_engine/demo_mnn_kpts/README.md Execute the compiled demo to run a speed benchmark. Mode '3' is for benchmark, and the second argument is typically '0' for a dummy input. ```shell ./tinypose-mnn "3" "0" ``` -------------------------------- ### COCO Dataset Image Information Example Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/data/PrepareDetDataSet.md This is an example of the information structure for a single image within a COCO annotation JSON file. ```json { 'license': 3, 'file_name': '000000391895.jpg', 'coco_url': 'http://images.cocodataset.org/train2017/000000391895.jpg', 'height': 360, 'width': 640, 'date_captured': '2013-11-14 11:18:45', 'flickr_url': 'http://farm9.staticflickr.com/8186/8119368305_4e622c8349_z.jpg', 'id': 391895 } ``` -------------------------------- ### Launch VisualDL Server Source: https://github.com/paddlepaddle/paddleyolo/blob/develop/docs/tutorials/GETTING_STARTED_cn.md This command starts the VisualDL server to view training logs. It defaults to running on 127.0.0.1 but can be configured with a different IP using the --host parameter. ```shell # 下述命令会在127.0.0.1上启动一个服务,支持通过前端web页面查看,可以通过--host这个参数指定实际ip地址 visualdl --logdir vdl_dir/scalar/ ```