Initial commit

This commit is contained in:
2026-03-31 13:28:42 +02:00
commit 94bbdca745
224 changed files with 83161 additions and 0 deletions

12
darknet-master/.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://paypal.me/alexeyab84', 'https://blockchain.coinmarketcap.com/address/bitcoin/36La9T7DoLVMrUQzm6rBDGsxutyvDzbHnp', 'https://etherscan.io/address/0x193d56BE3C65e3Fb8f48c291B17C0702e211A588#', 'https://explorer.zcha.in/accounts/t1PzwJ28Prb7Nk8fgfT3RXCr6Xtw54tgjoy'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

View File

@@ -0,0 +1,25 @@
---
name: Any other question or issue
about: Any other question or issue
title: ''
labels: ''
assignees: ''
---
If something doesnt work for you, then show 2 screenshots:
1. screenshots of your issue
2. screenshots with such information
```
./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/dog.jpg
CUDA-version: 10000 (10000), cuDNN: 7.4.2, CUDNN_HALF=1, GPU count: 1
CUDNN_HALF=1
OpenCV version: 4.2.0
0 : compute_capability = 750, cudnn_half = 1, GPU: GeForce RTX 2070
net.optimized_memory = 0
mini_batch = 1, batch = 8, time_steps = 1, train = 0
layer filters size/strd(dil) input output
0 conv 32 3 x 3/ 1 608 x 608 x 3 -> 608 x 608 x 32 0.639 BF
```
If you do not get an answer for a long time, try to find the answer among Issues with a Solved label: https://github.com/AlexeyAB/darknet/issues?q=is%3Aopen+is%3Aissue+label%3ASolved

View File

@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
If you want to report a bug - provide:
* description of a bug
* what command do you use?
* do you use Win/Linux/Mac?
* attach screenshot of a bug with previous messages in terminal
* in what cases a bug occurs, and in which not?
* if possible, specify date/commit of Darknet that works without this bug
* show such screenshot with info
```
./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/dog.jpg
CUDA-version: 10000 (10000), cuDNN: 7.4.2, CUDNN_HALF=1, GPU count: 1
CUDNN_HALF=1
OpenCV version: 4.2.0
0 : compute_capability = 750, cudnn_half = 1, GPU: GeForce RTX 2070
net.optimized_memory = 0
mini_batch = 1, batch = 8, time_steps = 1, train = 0
layer filters size/strd(dil) input output
```

View File

@@ -0,0 +1,13 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: Feature-request
assignees: ''
---
For Feature-request:
* describe your feature as detailed as possible
* provide link to the paper and/or source code if it exist
* attach chart/table with comparison that shows improvement

View File

@@ -0,0 +1,30 @@
---
name: Training issue - no-detections / Nan avg-loss / low accuracy
about: Training issue - no-detections / Nan avg-loss / low accuracy
title: ''
labels: Training issue
assignees: ''
---
If you have an issue with training - no-detections / Nan avg-loss / low accuracy:
* read FAQ: https://github.com/AlexeyAB/darknet/wiki/FAQ---frequently-asked-questions
* what command do you use?
* what dataset do you use?
* what Loss and mAP did you get?
* show chart.png with Loss and mAP
* check your dataset - run training with flag `-show_imgs` i.e. `./darknet detector train ... -show_imgs` and look at the `aug_...jpg` images, do you see correct truth bounded boxes?
* rename your cfg-file to txt-file and drag-n-drop (attach) to your message here
* show content of generated files `bad.list` and `bad_label.list` if they exist
* Read `How to train (to detect your custom objects)` and `How to improve object detection` in the Readme: https://github.com/AlexeyAB/darknet/blob/master/README.md
* show such screenshot with info
```
./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/dog.jpg
CUDA-version: 10000 (10000), cuDNN: 7.4.2, CUDNN_HALF=1, GPU count: 1
CUDNN_HALF=1
OpenCV version: 4.2.0
0 : compute_capability = 750, cudnn_half = 1, GPU: GeForce RTX 2070
net.optimized_memory = 0
mini_batch = 1, batch = 8, time_steps = 1, train = 0
layer filters size/strd(dil) input output
```

View File

@@ -0,0 +1,727 @@
name: Darknet Continuous Integration
on:
push:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
schedule:
- cron: '0 0 * * *'
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,vcpkgbinarycache,readwrite'
VCPKG_FORCE_DOWNLOADED_BINARIES: "TRUE"
jobs:
ubuntu-makefile:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt install libopencv-dev libgles2-mesa-dev
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
- name: 'Create softlinks for CUDA'
run: |
source ${{ github.workspace }}/scripts/requested_cuda_version.sh
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so
- name: 'LIBSO=1 GPU=0 CUDNN=0 OPENCV=0'
run: |
make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 -j 8
make clean
- name: 'LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 DEBUG=1'
run: |
make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 DEBUG=1 -j 8
make clean
- name: 'LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 AVX=1'
run: |
make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 AVX=1 -j 8
make clean
- name: 'LIBSO=1 GPU=0 CUDNN=0 OPENCV=1'
run: |
make LIBSO=1 GPU=0 CUDNN=0 OPENCV=1 -j 8
make clean
- name: 'LIBSO=1 GPU=1 CUDNN=1 OPENCV=1'
run: |
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 -j 8
make clean
- name: 'LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1'
run: |
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 -j 8
make clean
- name: 'LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 USE_CPP=1'
run: |
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 USE_CPP=1 -j 8
make clean
ubuntu-vcpkg-opencv4-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
- uses: lukka/get-cmake@latest
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
- name: 'Create softlinks for CUDA'
run: |
source ${{ github.workspace }}/scripts/requested_cuda_version.sh
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: Setup NuGet API key if found
shell: bash
env:
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
if: env.BAGET_API_KEY != null
run: >
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -DisableInteractive -DoNotUpdateTOOL -BuildInstaller
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-cuda-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-cuda-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-cuda-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-cuda-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
ubuntu-vcpkg-opencv3-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
- name: 'Create softlinks for CUDA'
run: |
source ${{ github.workspace }}/scripts/requested_cuda_version.sh
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: Setup NuGet API key if found
shell: bash
env:
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
if: env.BAGET_API_KEY != null
run: >
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -ForceOpenCVVersion 3 -DisableInteractive -DoNotUpdateTOOL
ubuntu-vcpkg-opencv2-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
- name: 'Create softlinks for CUDA'
run: |
source ${{ github.workspace }}/scripts/requested_cuda_version.sh
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: Setup NuGet API key if found
shell: bash
env:
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
if: env.BAGET_API_KEY != null
run: >
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -ForceOpenCVVersion 2 -DisableInteractive -DoNotUpdateTOOL
ubuntu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt install libopencv-dev
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
ubuntu-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt install libopencv-dev libgles2-mesa-dev
- uses: lukka/get-cmake@latest
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
- name: 'Create softlinks for CUDA'
run: |
source ${{ github.workspace }}/scripts/requested_cuda_version.sh
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -EnableOPENCV -EnableCUDA -EnableCUDNN -DisableInteractive -DoNotUpdateTOOL
- uses: actions/upload-artifact@v3
with:
name: darknet-cuda-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v3
with:
name: darknet-cuda-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v3
with:
name: darknet-cuda-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v3
with:
name: darknet-cuda-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
ubuntu-no-ocv-cpp:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -ForceCPP -DisableInteractive -DoNotUpdateTOOL
- name: Test on data/dog.jpg
shell: bash
run: >
wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights -O ${{ github.workspace }}/yolov4-tiny.weights;
${{ github.workspace }}/build_release/darknet detect ${{ github.workspace }}/cfg/yolov4-tiny.cfg ${{ github.workspace }}/yolov4-tiny.weights ${{ github.workspace }}/data/dog.jpg -dont_show
ubuntu-setup-sh:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: Setup NuGet API key if found
shell: bash
env:
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
if: env.BAGET_API_KEY != null
run: >
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Setup'
shell: bash
run: ${{ github.workspace }}/scripts/setup.sh -InstallTOOLS -InstallCUDA -BypassDRIVER
osx-vcpkg:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
- name: Install dependencies
run: brew install libomp yasm nasm pkg-config
- uses: lukka/get-cmake@latest
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: Setup NuGet API key if found
shell: bash
env:
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
if: env.BAGET_API_KEY != null
run: >
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL -BuildInstaller
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: brew install opencv libomp
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
osx-no-ocv-no-omp-cpp:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -ForceCPP -DisableInteractive -DoNotUpdateTOOL
win-vcpkg:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
- uses: lukka/get-cmake@latest
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: Setup NuGet API key if found
shell: bash
env:
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
if: env.BAGET_API_KEY != null
run: >
$(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -ForceLocalVCPKG -DoNotUpdateVCPKG -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL -BuildInstaller
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: ${{ github.workspace }}/build_release/*.dll
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
win-vcpkg-port:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: Setup NuGet API key if found
shell: bash
env:
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
if: env.BAGET_API_KEY != null
run: >
$(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -ForceLocalVCPKG -InstallDARKNETthroughVCPKG -ForceVCPKGDarknetHEAD -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL
win-intlibs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -DisableInteractive -DoNotUpdateTOOL
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/3rdparty/pthreads/bin/*.dll
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
win-setup-ps1:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: Setup NuGet API key if found
shell: bash
env:
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
if: env.BAGET_API_KEY != null
run: >
$(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Setup'
shell: pwsh
run: ${{ github.workspace }}/scripts/setup.ps1 -InstallCUDA
win-vcpkg-base-cpp:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: Setup NuGet API key if found
shell: bash
env:
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
if: env.BAGET_API_KEY != null
run: >
$(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -ForceLocalVCPKG -DoNotUpdateVCPKG -ForceCPP -DisableInteractive -DoNotUpdateTOOL
- name: Download yolov4-tiny.weights
run: curl.exe -L https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights -o ${{ github.workspace }}\yolov4-tiny.weights
- name: Test on data/dog.jpg
run: ${{ github.workspace }}\build_release\darknet.exe detect ${{ github.workspace }}\cfg\yolov4-tiny.cfg ${{ github.workspace }}\yolov4-tiny.weights ${{ github.workspace }}\data\dog.jpg
win-csharp:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -EnableCSharpWrapper -DisableInteractive -DoNotUpdateTOOL
win-intlibs-cuda:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.ps1
- uses: lukka/get-cmake@latest
- name: 'Build'
env:
CUDA_PATH: "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.2"
CUDA_TOOLKIT_ROOT_DIR: "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.2"
CUDACXX: "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.2\\bin\\nvcc.exe"
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -EnableCUDA -DisableInteractive -DoNotUpdateTOOL
win-powershell51:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: powershell
run: ${{ github.workspace }}/build.ps1 -DisableInteractive -DoNotUpdateTOOL
mingw:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build with CMake'
run: |
mkdir build_release
cd build_release
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF
cmake --build . --config Release --target install

View File

@@ -0,0 +1,469 @@
name: Darknet Pull Requests
on: [pull_request]
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,vcpkgbinarycache,read'
VCPKG_FORCE_DOWNLOADED_BINARIES: "TRUE"
jobs:
ubuntu-makefile:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt install libopencv-dev libgles2-mesa-dev
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
- name: 'Create softlinks for CUDA'
run: |
source ${{ github.workspace }}/scripts/requested_cuda_version.sh
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so
- name: 'LIBSO=1 GPU=0 CUDNN=0 OPENCV=0'
run: |
make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 -j 8
make clean
- name: 'LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 DEBUG=1'
run: |
make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 DEBUG=1 -j 8
make clean
- name: 'LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 AVX=1'
run: |
make LIBSO=1 GPU=0 CUDNN=0 OPENCV=0 AVX=1 -j 8
make clean
- name: 'LIBSO=1 GPU=0 CUDNN=0 OPENCV=1'
run: |
make LIBSO=1 GPU=0 CUDNN=0 OPENCV=1 -j 8
make clean
- name: 'LIBSO=1 GPU=1 CUDNN=1 OPENCV=1'
run: |
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 -j 8
make clean
- name: 'LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1'
run: |
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 -j 8
make clean
- name: 'LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 USE_CPP=1'
run: |
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
make LIBSO=1 GPU=1 CUDNN=1 OPENCV=1 CUDNN_HALF=1 USE_CPP=1 -j 8
make clean
ubuntu-vcpkg-opencv4-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
- name: 'Create softlinks for CUDA'
run: |
source ${{ github.workspace }}/scripts/requested_cuda_version.sh
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -DisableInteractive -DoNotUpdateTOOL
ubuntu-vcpkg-opencv3-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
- name: 'Create softlinks for CUDA'
run: |
source ${{ github.workspace }}/scripts/requested_cuda_version.sh
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -ForceOpenCVVersion 3 -DisableInteractive -DoNotUpdateTOOL
ubuntu-vcpkg-opencv2-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install -y --no-install-recommends yasm nasm gperf libgles2-mesa-dev libx11-dev libxft-dev libxext-dev libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev libdbus-1-dev libxtst-dev
- name: Clean downloads
run: sudo apt-get clean
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
- name: 'Create softlinks for CUDA'
run: |
source ${{ github.workspace }}/scripts/requested_cuda_version.sh
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -ForceOpenCVVersion 2 -DisableInteractive -DoNotUpdateTOOL
ubuntu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt install libopencv-dev
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL
ubuntu-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt install libopencv-dev libgles2-mesa-dev
- uses: lukka/get-cmake@latest
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.sh
- name: 'Create softlinks for CUDA'
run: |
source ${{ github.workspace }}/scripts/requested_cuda_version.sh
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-${CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${CUDA_VERSION}/lib64/libcuda.so
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -EnableOPENCV -EnableCUDA -EnableCUDNN -DisableInteractive -DoNotUpdateTOOL
ubuntu-no-ocv-cpp:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -ForceCPP -DisableInteractive -DoNotUpdateTOOL
- name: Test on data/dog.jpg
shell: bash
run: >
wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights -O ${{ github.workspace }}/yolov4-tiny.weights;
${{ github.workspace }}/build_release/darknet detect ${{ github.workspace }}/cfg/yolov4-tiny.cfg ${{ github.workspace }}/yolov4-tiny.weights ${{ github.workspace }}/data/dog.jpg -dont_show
ubuntu-setup-sh:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Setup'
shell: bash
run: ${{ github.workspace }}/scripts/setup.sh -InstallTOOLS -InstallCUDA -BypassDRIVER
osx-vcpkg:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: brew install libomp yasm nasm pkg-config
- uses: lukka/get-cmake@latest
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL
osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: brew install opencv libomp
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL
osx-no-ocv-no-omp-cpp:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -ForceCPP -DisableInteractive -DoNotUpdateTOOL
win-vcpkg:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -ForceLocalVCPKG -DoNotUpdateVCPKG -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL
win-intlibs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -DisableInteractive -DoNotUpdateTOOL
win-setup-ps1:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Setup'
shell: pwsh
run: ${{ github.workspace }}/scripts/setup.ps1 -InstallCUDA
win-vcpkg-base-cpp:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -ForceLocalVCPKG -DoNotUpdateVCPKG -ForceCPP -DisableInteractive -DoNotUpdateTOOL
- name: Download yolov4-tiny.weights
run: curl.exe -L https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights -o ${{ github.workspace }}\yolov4-tiny.weights
- name: Test on data/dog.jpg
run: ${{ github.workspace }}\build_release\darknet.exe detect ${{ github.workspace }}\cfg\yolov4-tiny.cfg ${{ github.workspace }}\yolov4-tiny.weights ${{ github.workspace }}\data\dog.jpg
win-csharp:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -EnableCSharpWrapper -DisableInteractive -DoNotUpdateTOOL
win-intlibs-cuda:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.ps1
- uses: lukka/get-cmake@latest
- name: 'Build'
env:
CUDA_PATH: "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.2"
CUDA_TOOLKIT_ROOT_DIR: "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.2"
CUDACXX: "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.2\\bin\\nvcc.exe"
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -EnableCUDA -DisableInteractive -DoNotUpdateTOOL
win-powershell51:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build'
shell: powershell
run: ${{ github.workspace }}/build.ps1 -DisableInteractive -DoNotUpdateTOOL
mingw:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: 'Build with CMake'
run: |
mkdir build_release
cd build_release
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF
cmake --build . --config Release --target install

View File

@@ -0,0 +1,26 @@
name: Automatic Rebase
on:
issue_comment:
types: [created]
jobs:
rebase:
name: Rebase
runs-on: ubuntu-latest
if: >-
github.event.issue.pull_request != '' &&
(
contains(github.event.comment.body, '/rebase') ||
contains(github.event.comment.body, '/autosquash')
)
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.8
with:
autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}