Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4329e56
adding basic slurm file for job submission
Senja20 Jun 1, 2024
be4ce19
updated the ci installation of requirenmetns to use dependencies from…
Senja20 Jun 1, 2024
a1480e0
✨ feat: Push the model to the hub
Senja20 Jun 6, 2024
3b4ca9f
📌 update the requirements.txt
Senja20 Jun 7, 2024
daaa619
➖ simplify requirements.txt by removing unused stuff
Senja20 Jun 8, 2024
a241df0
🔥 remove hugging face
Senja20 Jun 9, 2024
bcff411
feat: update slurm file
Senja20 Jul 15, 2024
b0604d3
✨ using the pt format for model storage
Senja20 Jul 15, 2024
80648c9
Merge branch '13-traning-on-idun' of github.com:vortexntnu/vortex-ima…
Senja20 Jul 15, 2024
c1d49c3
🔧 remove redundent steps from slurm file
Senja20 Jul 15, 2024
3f545ba
✨ feat: Update YOLO model training parameters
Senja20 Aug 22, 2024
ad41066
➖ Update requirements.txt to remove unused dependencies
Senja20 Aug 22, 2024
79c728d
➖ Update requirements.txt to remove unused dependencies
Senja20 Aug 22, 2024
ade6626
🔥 Update Job.slurm to install protobuf package
Senja20 Aug 22, 2024
793a882
➕ Update protobuf package version in requirements.txt
Senja20 Aug 22, 2024
4cfe24f
✨ feat: Enhance Job.slurm for improved environment setup and package …
Senja20 Jan 20, 2025
0a28975
added yolo roboflow training script
vortexuser Jan 21, 2025
d07aa1a
unet training script
vortexuser Feb 1, 2025
7a7cfaa
update: added correct account name and time
VegraD Feb 16, 2025
5b186db
Delete .github/workflows/pylint.yml
kluge7 Oct 26, 2025
89102ab
Delete .gitignore
kluge7 Oct 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 0 additions & 66 deletions .github/workflows/pylint.yml

This file was deleted.

167 changes: 0 additions & 167 deletions .gitignore

This file was deleted.

50 changes: 50 additions & 0 deletions YOLO-detect-buoys/Job.slurm
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
#SBATCH --partition=GPUQ
#SBATCH --account=ie-idi
#SBATCH --time=999:99:99
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --gres=gpu:a100:4
#SBATCH --constraint="gpu40g|gpu80g|gpu32g"
#SBATCH --job-name="vortex-img-process"
#SBATCH --output=vortex_img_process_log.out
#SBATCH --mem=32G

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/cluster/apps/eb/software/Python/3.10.4-GCCcore-11.3.0/lib/

set -e

module purge
module --ignore_cache load foss/2022a
module --ignore_cache load Python/3.10.4-GCCcore-11.3.0

pip cache purge

# makes sure that the pip is up to date
python3 -m pip install --upgrade pip

# Create a temporary virtual environment
VENV_DIR=$(mktemp -d -t env-repaint-XXXXXXXXXX)
python3 -m venv $VENV_DIR
source $VENV_DIR/bin/activate

pip install --upgrade pip

# install the required packages
pip install -r requirements.txt
#pip install pyyaml # used to read the configuration file
#pip install blobfile # install blobfile to download the dataset
#pip install kagglehub # install kagglehub to download the dataset
pip install --force-reinstall torch -U
pip install torchvision torchaudio
#pip install diffusers transformers accelerate --user

# Mixing expandable_segments:True with max_split_size doesn't make sense because the expandable segment is the size of RAM and so it could never be split with max_split_size.
# export PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True,max_split_size_mb:128"
export PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True"

python3 train.py

# Deactivate and remove the virtual environment
deactivate
rm -rf $VENV_DIR
19 changes: 16 additions & 3 deletions YOLO-detect-buoys/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,39 @@
The main entry point for YOLO detecter buoys.
"""

from os import getcwd, path
from os import getcwd, getenv, path

from dotenv import load_dotenv
from huggingface_hub import HfApi, Repository
from ultralytics import YOLO
from utils import get_data, get_device, process_video

if "__main__" == __name__:

load_dotenv()

device = get_device()
print("device", device)
model = YOLO("yolov8n.pt")

file_path = path.abspath(getcwd())
dataset = get_data()

result = model.train(
data=dataset.location + "\\data.yaml", epochs=50, imgsz=640, device=device
data=dataset.location + "/data.yaml",
epochs=100,
imgsz=640,
device=device,
batch=4,
cache=False,
)

model.val()

process_video("https://youtu.be/4WGpIOwkLA4?feature=shared", model)
path = model.export(format="onnx") # export to onnx

print("Model exported to: " + path)
print(path)

# References:
# https://docs.ultralytics.com/quickstart/#install-ultralytics
10 changes: 10 additions & 0 deletions YOLO-detect-buoys/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
huggingface_hub==0.23.3
numpy==1.26.4
opencv_contrib_python==4.9.0.80
opencv_python==4.9.0.80
pafy==0.5.5
python-dotenv==1.0.1
roboflow==1.1.24
torch==2.2.1
protobuf==4.24.0
ultralytics==8.0.196
Binary file removed requirements.txt
Binary file not shown.
50 changes: 50 additions & 0 deletions unet_roboflow_training/Job.slurm
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
#SBATCH --partition=GPUQ
#SBATCH --account=ie-idi
#SBATCH --time=999:99:99
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid SLURM time format '999:99:99'. The time format should be DD-HH:MM:SS, HH:MM:SS, or MM:SS with valid values (e.g., hours 0-23, minutes/seconds 0-59).

Suggested change
#SBATCH --time=999:99:99
#SBATCH --time=7-00:00:00

Copilot uses AI. Check for mistakes.
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --gres=gpu:a100:4
#SBATCH --constraint="gpu40g|gpu80g|gpu32g"
#SBATCH --job-name="vortex-img-process"
#SBATCH --output=vortex_img_process_log.out
#SBATCH --mem=32G

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/cluster/apps/eb/software/Python/3.10.4-GCCcore-11.3.0/lib/

set -e

module purge
module --ignore_cache load foss/2022a
module --ignore_cache load Python/3.10.4-GCCcore-11.3.0

pip cache purge

# makes sure that the pip is up to date
python3 -m pip install --upgrade pip

# Create a temporary virtual environment
VENV_DIR=$(mktemp -d -t env-repaint-XXXXXXXXXX)
python3 -m venv $VENV_DIR
source $VENV_DIR/bin/activate

pip install --upgrade pip

# install the required packages
pip install -r requirements.txt
#pip install pyyaml # used to read the configuration file
#pip install blobfile # install blobfile to download the dataset
#pip install kagglehub # install kagglehub to download the dataset
pip install --force-reinstall torch -U
pip install torchvision torchaudio
#pip install diffusers transformers accelerate --user

# Mixing expandable_segments:True with max_split_size doesn't make sense because the expandable segment is the size of RAM and so it could never be split with max_split_size.
# export PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True,max_split_size_mb:128"
export PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True"

python3 train.py

# Deactivate and remove the virtual environment
deactivate
rm -rf $VENV_DIR
Loading