export PATH="$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/snap/bin:$HOME/.local/bin"
deb https://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware deb-src https://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
# Debian Haupt-Repository (Leaseweb Mirror) deb http://mirror.de.leaseweb.net/debian/ bookworm main contrib non-free non-free-firmware deb-src http://mirror.de.leaseweb.net/debian/ bookworm main contrib non-free non-free-firmware # Sicherheitsupdates deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware # Updates (Empfohlen für wichtige Bugfixes) deb http://mirror.de.leaseweb.net/debian/ bookworm-updates main contrib non-free non-free-firmware deb-src http://mirror.de.leaseweb.net/debian/ bookworm-updates main contrib non-free non-free-firmware # Backports (Bereits angegeben) deb http://mirror.de.leaseweb.net/debian/ bookworm-backports main contrib non-free non-free-firmware deb-src http://mirror.de.leaseweb.net/debian/ bookworm-backports main contrib non-free non-free-firmware
apt-get install mc wget curl git htop iftop powertop screen mosh build-essential dkms gcc vnstat bash-completion
apt-get install linux-image-6.12.9+bpo-amd64 linux-headers-6.12.9+bpo-amd64
6.1.0 war stable
neuer testlauf
apt install -t bookworm-backports linux-image-amd64 linux-headers-amd64
sudo nano /etc/profile
export PATH="$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/snap/bin:$HOME/.local/bin"
source ~/.bashrc
echo $PATH
PYTHON SCRIPT ZUM TESTEN:
url_raw_inputs = "https://drive.google.com/uc?id=1u8lqzfgcyWDvCeO_H3w_EHkW5yuZZmF6" gdown.download(url_raw_inputs, (work_dir / "M1180981884LE_clipped.tif").as_posix(), quiet=True) # only work for Linux or UNIX machine (for Windows user, you can unzip the folder manually) !mkdir ~/tmp/BOULDERING/predictions # comment if this does not work, and make a directory manually !mv ~/tmp/BOULDERING/M1180981884LE_clipped.tif ~/tmp/BOULDERING/predictions import gdown import geopandas as gpd import matplotlib.pyplot as plt from MLtools import inference, plotting #from pathlib import Path import os model_dir = 'C:\\Users\\sungw620\\Powershell_env\\boulder_env\\best_model' config_file = os.path.join(model_dir, "model_setup-v050.yaml") model_weights = os.path.join(model_dir, "model_weights.pth") device = "cuda" in_raster = os.path.join(model_dir, "test", "M1180981884LE_clipped.tif") search_tif_pattern = "*.tif" distance_p = 0.625 block_width = 512 block_height = 512 output_dir = os.path.join(model_dir, "test") is_tta = True # so that it can be run with GPU scores_thresh_test = 0.10 nms_thresh_test = 0.30 min_size_test = 1024 max_size_test = 1024 pre_nms_topk_test = 2000 post_nms_topk_test = 1000 detections_per_image = 2000 inference.predictions_stitching_filtering(in_raster, config_file, model_weights, device, search_tif_pattern, distance_p, block_width, block_height, output_dir, is_tta=is_tta, scores_thresh_test=scores_thresh_test, nms_thresh_test=nms_thresh_test, min_size_test=min_size_test, max_size_test=max_size_test, pre_nms_topk_test=pre_nms_topk_test, post_nms_topk_test=post_nms_topk_test, detections_per_image=detections_per_image)
Model inputs brauchst du auch:
url_model_setup = "https://drive.google.com/uc?id=1O-EH_VmzpI3s4V1ouSFXg8jhbNjZpqlj" url_model_setup_base = "https://drive.google.com/uc?id=19aYv6aPvpbCD8EXvcfHB1abkibLTxTbB" url_aug_setup = "https://drive.google.com/uc?id=1SHSQgbN9hUyu-mCRKvUO9J8HgryOgh1X" url_model_weights = "https://drive.google.com/uc?id=1hTufdIEHo06M0ZzDPZ1MxQRKzxE0VVkO" gdown.download(url_model_setup, (work_dir / "model_setup-v050.yaml").as_posix(), quiet=True) gdown.download(url_model_setup_base, (work_dir / "base_setup.yaml").as_posix(), quiet=True) gdown.download(url_aug_setup, (work_dir / "augmentation_setup.json").as_posix(), quiet=True) gdown.download(url_model_weights, (work_dir / "model_weights.pth").as_posix(), quiet=True)
- Setup of the model: https://github.com/astroNils/MLtools/blob/main/resources/nb/INFERENCE_BOULDERING.ipynb
- BE CAREFUL, you have to modify the first line in the model_setup.yaml so that the path stored in the variable _BASE_ corresponds to the actual path on your own computer.