Skip to content

Runs on schedule

Runs on schedule #56

name: PaddleX cv pipeline Run Check
run-name: Runs on ${{ github.event_name }}
on:
workflow_dispatch:
workflow_call:
schedule:
- cron: "0 20 * * *"
jobs:
run-check:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest, macos-latest, macos-13, ubuntu-24.04-arm, windows-latest] # x86 和 ARM
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and install setuptools
run: python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: python -m pip install --pre paddlepaddle -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
- name: PaddlePaddle Run Check
run: |
python -c "import paddle; paddle.version.show(); paddle.utils.run_check()"
- name: git clone PaddleX
run: |
git clone https://github.com/PaddlePaddle/PaddleX.git
- name: install CV requirements
run: |
cd PaddleX
pip install -e .[cv]
- name: test image_classification
run: |
cd PaddleX
paddlex --pipeline image_classification --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg --device cpu --save_path ./output/
- name: test object_detection
run: |
cd PaddleX
paddlex --pipeline object_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_object_detection_002.png --threshold 0.5 --save_path ./output/ --device cpu
- name: test instance_segmentation
run: |
cd PaddleX
paddlex --pipeline instance_segmentation --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_instance_segmentation_004.png --threshold 0.5 --save_path ./output --device cpu
- name: test semantic_segmentation
run: |
cd PaddleX
paddlex --pipeline semantic_segmentation --input https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/application/semantic_segmentation/makassaridn-road_demo.png --target_size -1 --save_path ./output --device cpu
- name: test image_multilabel_classification
run: |
cd PaddleX
paddlex --pipeline image_multilabel_classification --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg --device cpu
- name: test small_object_detection
run: |
cd PaddleX
paddlex --pipeline small_object_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/small_object_detection.jpg --threshold 0.5 --save_path ./output --device cpu
- name: test anomaly_detection
run: |
cd PaddleX
paddlex --pipeline anomaly_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/uad_grid.png --device cpu --save_path ./output
# 只支持gpu
# - name: test 3d_bev_detection
# run: |
# cd PaddleX
# paddlex --pipeline 3d_bev_detection \
# --input https://paddle-model-ecology.bj.bcebos.com/paddlex/det_3d/demo_det_3d/nuscenes_demo_infer.tar \
# --device cpu
- name: test human_keypoint_detection
run: |
cd PaddleX
paddlex --pipeline human_keypoint_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/keypoint_detection_001.jpg --det_threshold 0.5 --save_path ./output/ --device cpu
# 不属于cv
# - name: test open_vocabulary_detection
# run: |
# cd PaddleX
# wget -q https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/open_vocabulary_detection.jpg
# paddlex --pipeline open_vocabulary_detection \
# --input open_vocabulary_detection.jpg \
# --prompt "bus . walking man . rearview mirror ." \
# --thresholds "{'text_threshold': 0.25, 'box_threshold': 0.3}" \
# --save_path ./output \
# --device cpu
# - name: test open_vocabulary_segmentation
# run: |
# cd PaddleX
# paddlex --pipeline open_vocabulary_segmentation \
# --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/open_vocabulary_segmentation.jpg \
# --prompt_type box \
# --prompt "[[112.9,118.4,513.8,382.1],[4.6,263.6,92.2,336.6],[592.4,260.9,607.2,294.2]]" \
# --save_path ./output \
# --device cpu
- name: test rotated_object_detection
run: |
cd PaddleX
paddlex --pipeline rotated_object_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/rotated_object_detection_001.png --threshold 0.5 --save_path ./output --device cpu
- name: test pedestrian_attribute_recognition
run: |
cd PaddleX
paddlex --pipeline pedestrian_attribute_recognition --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pedestrian_attribute_002.jpg --device cpu --save_path ./output/
- name: test vehicle_attribute_recognition
run: |
cd PaddleX
paddlex --pipeline vehicle_attribute_recognition --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_attribute_002.jpg --device cpu --save_path ./output/
- name: prepare data for linux and mac
if: runner.os != 'Windows'
run: |
cd PaddleX
# PP-ShiTuV2
wget -q https://paddle-model-ecology.bj.bcebos.com/paddlex/data/drink_dataset_v2.0.tar
tar -xf drink_dataset_v2.0.tar
wget -q https://paddle-qa.bj.bcebos.com/suijiaxin/PaddleX/test_PP-ShiTuV2.py
# face_recognition
wget -q https://paddle-model-ecology.bj.bcebos.com/paddlex/data/face_demo_gallery.tar
tar -xf ./face_demo_gallery.tar
wget -q https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/friends1.jpg
wget -q https://paddle-qa.bj.bcebos.com/suijiaxin/PaddleX/test_face_recognition.py
- name: prepare data for windows
if: runner.os == 'Windows'
run: |
cd PaddleX
# PP-ShiTuV2
curl https://paddle-model-ecology.bj.bcebos.com/paddlex/data/drink_dataset_v2.0.tar -o drink_dataset_v2.0.tar
tar -xf drink_dataset_v2.0.tar
curl https://paddle-qa.bj.bcebos.com/suijiaxin/PaddleX/test_PP-ShiTuV2.py -o test_PP-ShiTuV2.py
# face_recognition
curl https://paddle-model-ecology.bj.bcebos.com/paddlex/data/face_demo_gallery.tar -o face_demo_gallery.tar
tar -xf ./face_demo_gallery.tar
curl https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/friends1.jpg -o friends1.jpg
curl https://paddle-qa.bj.bcebos.com/suijiaxin/PaddleX/test_face_recognition.py -o test_face_recognition.py
- name: test face_recognition
run: |
cd PaddleX
python test_face_recognition.py
- name: test PP-ShiTuV2
run: |
cd PaddleX
python test_PP-ShiTuV2.py