kopia lustrzana https://github.com/OpenDroneMap/ODM
Merge onnxrm
commit
9549a7de26
|
@ -1,56 +1,56 @@
|
|||
# name: Publish Snap
|
||||
name: Publish Snap
|
||||
|
||||
# on:
|
||||
# push:
|
||||
# branches:
|
||||
# - master
|
||||
# tags:
|
||||
# - v**
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v**
|
||||
|
||||
# jobs:
|
||||
# build-and-release:
|
||||
# runs-on: ubuntu-latest
|
||||
# strategy:
|
||||
# matrix:
|
||||
# architecture:
|
||||
# - amd64
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v2
|
||||
# - name: Set Swap Space
|
||||
# uses: pierotofy/set-swap-space@master
|
||||
# with:
|
||||
# swap-size-gb: 12
|
||||
# - name: Build
|
||||
# id: build
|
||||
# uses: diddlesnaps/snapcraft-multiarch-action@v1
|
||||
# with:
|
||||
# architecture: ${{ matrix.architecture }}
|
||||
# - name: Review
|
||||
# uses: diddlesnaps/snapcraft-review-tools-action@v1
|
||||
# with:
|
||||
# snap: ${{ steps.build.outputs.snap }}
|
||||
# isClassic: 'false'
|
||||
# - name: Publish unstable builds to Edge
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# uses: snapcore/action-publish@v1
|
||||
# with:
|
||||
# store_login: ${{ secrets.STORE_LOGIN }}
|
||||
# snap: ${{ steps.build.outputs.snap }}
|
||||
# release: edge
|
||||
# - name: Publish tagged prerelease builds to Beta
|
||||
# # These are identified by having a hyphen in the tag name, e.g.: v1.0.0-beta1
|
||||
# if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-')
|
||||
# uses: snapcore/action-publish@v1
|
||||
# with:
|
||||
# store_login: ${{ secrets.STORE_LOGIN }}
|
||||
# snap: ${{ steps.build.outputs.snap }}
|
||||
# release: beta
|
||||
# - name: Publish tagged stable or release-candidate builds to Candidate
|
||||
# # These are identified by NOT having a hyphen in the tag name, OR having "-RC" or "-rc" in the tag name.
|
||||
# if: startsWith(github.ref, 'refs/tags/v1') && ( ( ! contains(github.ref, '-') ) || contains(github.ref, '-RC') || contains(github.ref, '-rc') )
|
||||
# uses: snapcore/action-publish@v1
|
||||
# with:
|
||||
# store_login: ${{ secrets.STORE_LOGIN }}
|
||||
# snap: ${{ steps.build.outputs.snap }}
|
||||
# release: candidate
|
||||
jobs:
|
||||
build-and-release:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
architecture:
|
||||
- amd64
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set Swap Space
|
||||
uses: pierotofy/set-swap-space@master
|
||||
with:
|
||||
swap-size-gb: 12
|
||||
- name: Build
|
||||
id: build
|
||||
uses: diddlesnaps/snapcraft-multiarch-action@v1
|
||||
with:
|
||||
architecture: ${{ matrix.architecture }}
|
||||
- name: Review
|
||||
uses: diddlesnaps/snapcraft-review-tools-action@v1
|
||||
with:
|
||||
snap: ${{ steps.build.outputs.snap }}
|
||||
isClassic: 'false'
|
||||
- name: Publish unstable builds to Edge
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: snapcore/action-publish@v1
|
||||
with:
|
||||
store_login: ${{ secrets.STORE_LOGIN }}
|
||||
snap: ${{ steps.build.outputs.snap }}
|
||||
release: edge
|
||||
- name: Publish tagged prerelease builds to Beta
|
||||
# These are identified by having a hyphen in the tag name, e.g.: v1.0.0-beta1
|
||||
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-')
|
||||
uses: snapcore/action-publish@v1
|
||||
with:
|
||||
store_login: ${{ secrets.STORE_LOGIN }}
|
||||
snap: ${{ steps.build.outputs.snap }}
|
||||
release: beta
|
||||
- name: Publish tagged stable or release-candidate builds to Candidate
|
||||
# These are identified by NOT having a hyphen in the tag name, OR having "-RC" or "-rc" in the tag name.
|
||||
if: startsWith(github.ref, 'refs/tags/v1') && ( ( ! contains(github.ref, '-') ) || contains(github.ref, '-RC') || contains(github.ref, '-rc') )
|
||||
uses: snapcore/action-publish@v1
|
||||
with:
|
||||
store_login: ${{ secrets.STORE_LOGIN }}
|
||||
snap: ${{ steps.build.outputs.snap }}
|
||||
release: candidate
|
||||
|
|
|
@ -14,6 +14,8 @@ RS_DATABASE = {
|
|||
'dji fc7203': 20, # Mavic Mini v1
|
||||
'dji fc3170': 27, # DJI Mavic Air 2
|
||||
'dji fc3411': 32, # DJI Mavic Air 2S
|
||||
|
||||
'hasselblad l1d-20c': lambda p: 47 if p.get_capture_megapixels() < 19 else 56, # DJI Mavic 2 Pro (at 16:10 => 16.8MP 47ms, at 4:3 => 19.9MP 56ms)
|
||||
|
||||
'dji fc3582': lambda p: 26 if p.get_capture_megapixels() < 48 else 60, # DJI Mini 3 pro (at 48MP readout is 60ms, at 12MP it's 26ms)
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import time
|
|||
import numpy as np
|
||||
import cv2
|
||||
import os
|
||||
import onnx
|
||||
import onnxruntime as ort
|
||||
from .guidedfilter import guided_filter
|
||||
from opendm import log
|
||||
|
@ -27,17 +26,6 @@ class SkyFilter():
|
|||
|
||||
def load_model(self):
|
||||
log.ODM_INFO(' -> Loading the model')
|
||||
onnx_model = onnx.load(self.model)
|
||||
|
||||
# Check the model
|
||||
try:
|
||||
onnx.checker.check_model(onnx_model)
|
||||
except onnx.checker.ValidationError as e:
|
||||
log.ODM_INFO(' !> The model is invalid: %s' % e)
|
||||
raise
|
||||
else:
|
||||
log.ODM_INFO(' ?> The model is valid!')
|
||||
|
||||
self.session = ort.InferenceSession(self.model, providers=[provider])
|
||||
|
||||
|
||||
|
|
|
@ -29,5 +29,4 @@ scipy==1.8.1
|
|||
xmltodict==0.12.0
|
||||
fpdf2==2.4.6
|
||||
Shapely==1.7.1
|
||||
onnx==1.12.0
|
||||
onnxruntime==1.11.1
|
||||
onnxruntime==1.12.1
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
import site
|
||||
import os
|
||||
|
||||
snap_dir = os.getenv("SNAP")
|
||||
snapcraft_stage_dir = os.getenv("SNAPCRAFT_STAGE")
|
||||
snapcraft_part_install = os.getenv("SNAPCRAFT_PART_INSTALL")
|
||||
|
||||
# Do not include snap_dir during builds as this will include
|
||||
# snapcraft's in-snap site directory.
|
||||
if snapcraft_stage_dir is not None and snapcraft_part_install is not None:
|
||||
site_directories = [snapcraft_stage_dir, snapcraft_part_install]
|
||||
else:
|
||||
superbuild_dir = os.path.join(snap_dir, 'odm/SuperBuild/install')
|
||||
site_directories = [snap_dir, superbuild_dir]
|
||||
|
||||
for d in site_directories:
|
||||
if d:
|
||||
site_dir = os.path.join(d, "lib/python3.8/site-packages")
|
||||
site.addsitedir(site_dir)
|
||||
|
||||
if snap_dir:
|
||||
site.ENABLE_USER_SITE = False
|
|
@ -187,28 +187,17 @@ parts:
|
|||
build-snaps:
|
||||
- cmake
|
||||
|
||||
snap-specifics:
|
||||
source: snap/local
|
||||
plugin: dump
|
||||
|
||||
snapcraft-preload:
|
||||
source: https://github.com/sergiusens/snapcraft-preload.git
|
||||
plugin: cmake
|
||||
cmake-parameters:
|
||||
- -DCMAKE_INSTALL_PREFIX=/
|
||||
build-packages:
|
||||
- on amd64:
|
||||
- gcc-multilib
|
||||
- g++-multilib
|
||||
plugs:
|
||||
shared-memory:
|
||||
private: true
|
||||
|
||||
apps:
|
||||
opendronemap:
|
||||
command: odm/run.sh
|
||||
command-chain:
|
||||
- bin/snapcraft-preload # Fixes multiprocessing python module
|
||||
environment:
|
||||
# Ensure libraries are found
|
||||
LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/blas:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/lapack:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH: $SNAP/odm/SuperBuild/install/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/blas:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/lapack
|
||||
PYTHONPATH: $SNAP/odm/SuperBuild/install:$SNAP/lib/python3.8/site-packages:$SNAP/usr/lib/python3/dist-packages/:$SNAP/usr/lib/python3.8
|
||||
plugs:
|
||||
- home
|
||||
- network
|
||||
|
|
|
@ -187,19 +187,9 @@ parts:
|
|||
build-snaps:
|
||||
- cmake
|
||||
|
||||
snap-specifics:
|
||||
source: snap/local
|
||||
plugin: dump
|
||||
|
||||
snapcraft-preload:
|
||||
source: https://github.com/sergiusens/snapcraft-preload.git
|
||||
plugin: cmake
|
||||
cmake-parameters:
|
||||
- -DCMAKE_INSTALL_PREFIX=/
|
||||
build-packages:
|
||||
- on amd64:
|
||||
- gcc-multilib
|
||||
- g++-multilib
|
||||
plugs:
|
||||
shared-memory:
|
||||
private: true
|
||||
|
||||
apps:
|
||||
opendronemap:
|
||||
|
@ -208,7 +198,8 @@ apps:
|
|||
- bin/snapcraft-preload # Fixes multiprocessing python module
|
||||
environment:
|
||||
# Ensure libraries are found
|
||||
LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/blas:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/lapack:$LD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH: $SNAP/odm/SuperBuild/install/lib:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/blas:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/lapack
|
||||
PYTHONPATH: $SNAP/odm/SuperBuild/install:$SNAP/lib/python3.8/site-packages:$SNAP/usr/lib/python3/dist-packages/:$SNAP/usr/lib/python3.8
|
||||
plugs:
|
||||
- home
|
||||
- network
|
||||
|
|
|
@ -28,7 +28,7 @@ echo include-system-site-packages = false>> "%PYENVCFG%"
|
|||
|
||||
rem Hot-patching cv2 extension configs
|
||||
echo BINARIES_PATHS = [r"%SBBIN%"] + BINARIES_PATHS> venv\Lib\site-packages\cv2\config.py
|
||||
echo PYTHON_EXTENSIONS_PATHS = [r'%VIRTUAL_ENV%\lib\site-packages\cv2\python-3.8'] + PYTHON_EXTENSIONS_PATHS> venv\Lib\site-packages\cv2\config-3.8.py
|
||||
echo PYTHON_EXTENSIONS_PATHS = [r'''%VIRTUAL_ENV%\lib\site-packages\cv2\python-3.8'''] + PYTHON_EXTENSIONS_PATHS> venv\Lib\site-packages\cv2\config-3.8.py
|
||||
|
||||
if not defined PROMPT set PROMPT=$P$G
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue