diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 21ff07296fb..92fb50375b3 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -458,7 +458,7 @@ jobs: - uses: actions/upload-artifact@v2 with: name: darknet-vcpkg-${{ runner.os }} - path: ${{ runner.workspace }}/buildDirectory/Release/*.dll + path: ${{ github.workspace }}/build_release/*.dll - uses: actions/upload-artifact@v2 with: name: darknet-vcpkg-${{ runner.os }} diff --git a/.github/workflows/on_pr.yml b/.github/workflows/on_pr.yml index 6b6aface5b8..9f0a664ebcb 100644 --- a/.github/workflows/on_pr.yml +++ b/.github/workflows/on_pr.yml @@ -100,23 +100,6 @@ jobs: LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH" run: ./build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -DisableInteractive -DoNotUpdateDARKNET - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-cuda-${{ runner.os }} - path: cfg - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-cuda-${{ runner.os }} - path: data - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-cuda-${{ runner.os }} - path: ${{ github.workspace }}/*dark* - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-cuda-${{ runner.os }} - path: ${{ github.workspace }}/uselib* - ubuntu-vcpkg-opencv3-cuda: runs-on: ubuntu-20.04 @@ -219,23 +202,6 @@ jobs: LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH" run: ./build.ps1 -EnableOPENCV -DisableInteractive -DoNotUpdateDARKNET - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: cfg - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: data - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: ${{ github.workspace }}/*dark* - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: ${{ github.workspace }}/uselib* - ubuntu-cuda: runs-on: ubuntu-20.04 @@ -267,23 +233,6 @@ jobs: LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH" run: ./build.ps1 -EnableOPENCV -EnableCUDA -EnableCUDNN -DisableInteractive -DoNotUpdateDARKNET - - uses: actions/upload-artifact@v2 - with: - name: darknet-cuda-${{ runner.os }} - path: cfg - - uses: actions/upload-artifact@v2 - with: - name: darknet-cuda-${{ runner.os }} - path: data - - uses: actions/upload-artifact@v2 - with: - name: darknet-cuda-${{ runner.os }} - path: ${{ github.workspace }}/*dark* - - uses: actions/upload-artifact@v2 - with: - name: darknet-cuda-${{ runner.os }} - path: ${{ github.workspace }}/uselib* - ubuntu-no-ocv-cpp: runs-on: ubuntu-20.04 @@ -339,23 +288,6 @@ jobs: shell: pwsh run: ./build.ps1 -UseVCPKG -DoNotUpdateVCPKG -DisableInteractive -DoNotUpdateDARKNET - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-${{ runner.os }} - path: cfg - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-${{ runner.os }} - path: data - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-${{ runner.os }} - path: ${{ github.workspace }}/*dark* - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-${{ runner.os }} - path: ${{ github.workspace }}/uselib* - osx: runs-on: macos-latest @@ -371,23 +303,6 @@ jobs: shell: pwsh run: ./build.ps1 -EnableOPENCV -DisableInteractive -DoNotUpdateDARKNET - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: cfg - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: data - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: ${{ github.workspace }}/*dark* - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: ${{ github.workspace }}/uselib* - osx-no-ocv-no-omp-cpp: runs-on: macos-latest @@ -421,27 +336,6 @@ jobs: shell: pwsh run: ./build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -DisableInteractive -DoNotUpdateDARKNET - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-${{ runner.os }} - path: cfg - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-${{ runner.os }} - path: data - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-${{ runner.os }} - path: ${{ github.workspace }}/*dark* - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-${{ runner.os }} - path: ${{ runner.workspace }}/buildDirectory/Release/*.dll - - uses: actions/upload-artifact@v2 - with: - name: darknet-vcpkg-${{ runner.os }} - path: ${{ github.workspace }}/uselib* - win-intlibs: runs-on: windows-latest @@ -454,27 +348,6 @@ jobs: shell: pwsh run: ./build.ps1 -DisableInteractive -DoNotUpdateDARKNET - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: cfg - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: data - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: ${{ github.workspace }}/*dark* - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: ${{ github.workspace }}/3rdparty/pthreads/bin/*.dll - - uses: actions/upload-artifact@v2 - with: - name: darknet-${{ runner.os }} - path: ${{ github.workspace }}/uselib* - win-setup-ps1: runs-on: windows-latest diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml new file mode 100644 index 00000000000..251a259ffcf --- /dev/null +++ b/.github/workflows/rebase.yml @@ -0,0 +1,19 @@ +name: Automatic Rebase +on: + issue_comment: + types: [created] +jobs: + rebase: + name: Rebase + if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'CONTRIBUTOR') + runs-on: ubuntu-latest + steps: + - name: Checkout the latest code + uses: actions/checkout@v2 + 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.5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 337d095d44f..42007e975d6 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,12 @@ About Darknet framework: http://pjreddie.com/darknet/ [![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](https://github.com/AlexeyAB/darknet/blob/master/LICENSE) [![DOI](https://zenodo.org/badge/75388965.svg)](https://zenodo.org/badge/latestdoi/75388965) [![arxiv.org](http://img.shields.io/badge/cs.CV-arXiv%3A2004.10934-B31B1B.svg)](https://arxiv.org/abs/2004.10934) +[![arxiv.org](http://img.shields.io/badge/cs.CV-arXiv%3A2011.08036-B31B1B.svg)](https://arxiv.org/abs/2011.08036) [![colab](https://user-images.githubusercontent.com/4096485/86174089-b2709f80-bb29-11ea-9faf-3d8dc668a1a5.png)](https://colab.research.google.com/drive/12QusaaRj_lUwCGDvQNfICpa7kA7_a2dE) [![colab](https://user-images.githubusercontent.com/4096485/86174097-b56b9000-bb29-11ea-9240-c17f6bacfc34.png)](https://colab.research.google.com/drive/1_GdoqCJWXsChrOiY8sZMr_zbr_fH-0Fg) - [YOLOv4 model zoo](https://github.com/AlexeyAB/darknet/wiki/YOLOv4-model-zoo) -- [Requirements (and how to install dependencies)](#requirements) +- [Requirements (and how to install dependencies)](#requirements-for-windows-linux-and-macos) - [Pre-trained models](#pre-trained-models) - [FAQ - frequently asked questions](https://github.com/AlexeyAB/darknet/wiki/FAQ---frequently-asked-questions) - [Explanations in issues](https://github.com/AlexeyAB/darknet/issues?q=is%3Aopen+is%3Aissue+label%3AExplanations) diff --git a/build.ps1 b/build.ps1 index d230622e9a5..b5115cabc15 100755 --- a/build.ps1 +++ b/build.ps1 @@ -603,7 +603,7 @@ if (-Not $EnableOPENCV_CUDA) { } if ($EnableCSharpWrapper) { - $additional_build_setup = $additional_build_setup + " -DENABLE_CSHARP_WRAPPER:BOOL=ON" + $AdditionalBuildSetup = $AdditionalBuildSetup + " -DENABLE_CSHARP_WRAPPER:BOOL=ON" } $build_folder = "./build_release" diff --git a/src/csharp/CMakeLists.txt b/src/csharp/CMakeLists.txt index 971725b227d..1b591a16dab 100644 --- a/src/csharp/CMakeLists.txt +++ b/src/csharp/CMakeLists.txt @@ -1,5 +1,5 @@ -project(YoloWrapper LANGUAGES CSharp) +project(YoloCSharpWrapper LANGUAGES CSharp) include(CSharpUtilities) add_library(${PROJECT_NAME} diff --git a/src/csharp/YoloWrapper.cs b/src/csharp/YoloCSharpWrapper.cs similarity index 97% rename from src/csharp/YoloWrapper.cs rename to src/csharp/YoloCSharpWrapper.cs index 52c12adb80f..35d23a9c2e1 100644 --- a/src/csharp/YoloWrapper.cs +++ b/src/csharp/YoloCSharpWrapper.cs @@ -5,7 +5,7 @@ namespace Darknet { public class YoloWrapper : IDisposable { - private const string YoloLibraryName = "yolo_cpp_dll.dll"; + private const string YoloLibraryName = "darknet.dll"; private const int MaxObjects = 1000; [DllImport(YoloLibraryName, EntryPoint = "init")] diff --git a/src/parser.c b/src/parser.c index 8f8f584268e..a2d133382c4 100644 --- a/src/parser.c +++ b/src/parser.c @@ -2026,6 +2026,7 @@ void save_weights_upto(network net, char *filename, int cutoff, int save_ema) fwrite(l.biases, sizeof(float), l.outputs, fp); fwrite(l.weights, sizeof(float), size, fp); } + fflush(fp); } fclose(fp); }