Skip to content

Commit

Permalink
Merge pull request #76 from PUTvision/devel
Browse files Browse the repository at this point in the history
devel->master
  • Loading branch information
przemyslaw-aszkowski authored Nov 14, 2022
2 parents a6d2dd5 + 2b2239c commit 199c4c6
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
Expand All @@ -22,6 +26,13 @@ jobs:
- name: Update
run: |
sudo apt update
- if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt install gnupg software-properties-common
sudo mkdir -m755 -p /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/qgis-archive-keyring.gpg https://download.qgis.org/downloads/qgis-archive-keyring.gpg
echo $'Types: deb deb-src\nURIs: https://qgis.org/debian\nSuites: focal\nArchitectures: amd64\nComponents: main\nSigned-By: /etc/apt/keyrings/qgis-archive-keyring.gpg' | sudo tee -a /etc/apt/sources.list.d/qgis.sources
sudo apt update
- name: Install qgis
run: |
sudo apt install -yq qgis
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h2 align="center">Deepness: Deep Neural Remote Sensing QGIS Plugin</h2>
</p>

![main](https://github.com/PUTvision/qgis-plugin-deepness/actions/workflows/python-app.yml/badge.svg)
![main](https://github.com/PUTvision/qgis-plugin-deepness/actions/workflows/python-app-ubuntu.yml/badge.svg)
[![GitHub contributors](https://img.shields.io/github/contributors/PUTvision/qgis-plugin-deepness)](https://github.com/PUTvision/qgis-plugin-deepness/graphs/contributors)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
[![GitHub stars](https://img.shields.io/github/stars/PUTvision/qgis-plugin-deepness)](https://github.com/PUTvision/qgis-plugin-deepness/stargazers)
Expand Down
3 changes: 2 additions & 1 deletion docs/source/example/example_segmentation_landcover.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ We built our pipeline based on `Pytorch <https://github.com/pytorch/pytorch>`_,
* Model :code:`DeepLabV3+` with :code:`tu-semnasnet_100` backend
* Loss function: balanced :code:`FocalDiceLoss`
* Input image size: :code:`512x512`
* Normalization: :code:`mean=[0.485, 0.456, 0.406]`, :code:`std=[0.229, 0.224, 0.225]`
* Normalization: :code:`1./255.`
* Color order: :code:`RGB`

==================
Converting to onnx
Expand Down
5 changes: 3 additions & 2 deletions docs/source/main/main_supported_versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Supported Operating Systems
+---------------+------------------------------------+
| OS Family | Operating System |
+===============+====================================+
| Linux | Ubuntu 22.04, Fedora 37* |
| Linux | Ubuntu 20.04/22.04, Fedora 37* |
+---------------+------------------------------------+
| Windows | Windows 10 |
+---------------+------------------------------------+
| Mac OS | |
| Mac OS | Big Sur |
+---------------+------------------------------------+

:code:`*` means that it should work but has not beed tested yet
Expand All @@ -28,4 +28,5 @@ The plug-in was tested in the environment:

- Ubuntu 22.04.1 LTS and QGIS 3.22.11
- Ubuntu 22.04.1 LTS and QGIS 3.22.4
- Ubuntu 20.04 LTS and QGIS 3.28
- Windows 10.0.19043 and QGIS 3.26.3
10 changes: 7 additions & 3 deletions docs/source/main/model_zoo/MODEL_ZOO.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,20 @@ The [Model ZOO](https://chmura.put.poznan.pl/s/2pJk4izRurzQwu3) is a collection
## Object detection models

| Model name | Input size | CM/PX | Description | Example image |
|---|---|---|---|
|---|---|---|---|---|
| [Airbus Planes Detection](https://chmura.put.poznan.pl/s/bBIJ5FDPgyQvJ49) | 256 | 70 | YOLOv7 tiny model for object detection on satellite images. Based on the [Airbus Aircraft Detection dataset](https://www.kaggle.com/datasets/airbusgeo/airbus-aircrafts-sample-dataset). | [Image](https://chmura.put.poznan.pl/s/VfLmcWhvWf0UJfI) |
| [Airbus Oil Storage Detection](https://chmura.put.poznan.pl/s/gMundpKsYUC7sNb) | 512 | 150 | YOLOv5-m model for object detection on satellite images. Based on the [Airbus Oil Storage Detection dataset](https://www.kaggle.com/datasets/airbusgeo/airbus-oil-storage-detection-dataset). | [Image](https://chmura.put.poznan.pl/s/T3pwaKlbFDBB2C3) |

## Contributing

* PRs with models are welcome! Please follow the [general model information](https://qgis-plugin-deepness.readthedocs.io/en/latest/creators/creators_description_classes.html).
PRs with models are welcome!

* Please follow the [general model information](https://qgis-plugin-deepness.readthedocs.io/en/latest/creators/creators_description_classes.html).

* Use `MODEL_ZOO` tag in your PRs to make it easier to find them.

* If you need, you can check [how to export the model to ONNX](https://qgis-plugin-deepness.readthedocs.io/en/latest/creators/creators_example_onnx_model.html).

* And do not forget to [add metadata to the ONNX model](https://qgis-plugin-deepness.readthedocs.io/en/latest/creators/creators_add_metadata_to_model.html). You can host your model yourself or ask us to do it.
* And do not forget to [add metadata to the ONNX model](https://qgis-plugin-deepness.readthedocs.io/en/latest/creators/creators_add_metadata_to_model.html).

* You can host your model yourself or ask us to do it.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import importlib
import logging
import os
import platform
import subprocess
import sys
import traceback
Expand Down Expand Up @@ -48,8 +49,15 @@ def __str__(self):
# NOTE! For the time being requirement are repeated as in `requirements.txt` file
# Consider merging it into some common file in the future
# (if we can use a fixed version of pip packages for all python versions)

opencv_version = '4.6.0.66'
if sys.platform == "linux" or sys.platform == "linux2":
import lsb_release
if lsb_release.get_os_release()['CODENAME'] == 'focal':
opencv_version = '4.5.5.64'

packages_to_install = [
PackageToInstall(name='opencv-python-headless', version='4.6.0.66', import_name='cv2'),
PackageToInstall(name='opencv-python-headless', version=opencv_version, import_name='cv2'),
]

onnx_runtime_version = '1.12.1'
Expand Down
4 changes: 2 additions & 2 deletions plugin/deepness/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

[general]
name=Deepness: Deep Neural Remote Sensing
qgisMinimumVersion=3.10.14
qgisMinimumVersion=3.22
description=Inference of deep neural network models (ONNX) for segmentation, detection and regression
version=0.4.0
version=0.4.1
author=PUT Vision
[email protected]

Expand Down
2 changes: 0 additions & 2 deletions plugin/deepness/processing/models/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ def xywh2xyxy(x: np.ndarray) -> np.ndarray:
y[:, 3] = x[:, 1] + x[:, 3] / 2 # bottom right y
return y

@staticmethod

@staticmethod
def non_max_suppression_fast(boxes: np.ndarray, probs: np.ndarray, iou_threshold: float) -> List:
"""Apply non-maximum suppression to bounding boxes
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#pyqt5 # available already from qgis repo


# NOTE - for the time being - keep the same packages and versions in the `package_installer_dialog.py`
# NOTE - for the time being - keep the same packages and versions in the `packages_installer_dialog.py`
onnxruntime-gpu==1.12.1
opencv-python-headless==4.6.0.66 # opencv-python if you would like to display images while debugging
opencv-python-headless==4.6.0.66; python_version > '3.9' # opencv-python if you would like to display images while debugging
opencv-python-headless==4.5.5.64; python_version <= '3.9'

0 comments on commit 199c4c6

Please sign in to comment.