Skip to content

support post process if case use_udp == False #9

support post process if case use_udp == False

support post process if case use_udp == False #9

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install git+https://github.com/developer0hye/onepose.git
- name: Test Python
run: |
python -c "
import cv2
import onepose
import urllib
import numpy as np
import os
req = urllib.request.urlopen('https://raw.githubusercontent.com/developer0hye/onepose/main/onepose/assets/sample.png')
arr = np.asarray(bytearray(req.read()), dtype=np.uint8)
img = cv2.imdecode(arr, cv2.IMREAD_COLOR) # 'Load it as it is'
model = onepose.create_model()
keypoints = model(img)
num_keypoints = len(keypoints['points'])
pts = keypoints['points']
pts_confidence = keypoints['confidence']
for i in range(num_keypoints):
print(f'Point {i} {model.keypoint_info[i]} (x, y) : {pts[i]} confidence: {pts_confidence[i]}')
onepose.visualize_keypoints(img, keypoints, model.keypoint_info, model.skeleton_info)
os.makedirs('ci_artifacts', exist_ok=True)
cv2.imwrite('ci_artifacts/sample_output.png', img)
"
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: outputs
path: ci_artifacts
retention-days: 1