It is trained with
information-driven-uav-navigation,
a research framework for visual UAV navigation using RL/IL over aerial orthophoto
and land-use grid environments.
The following results represent the mean performance over 500 deterministic validation episodes in continuous environments featuring authentic ČÚZK orthophotos.
1import importlib.util, sys, numpy as np
2from huggingface_hub import hf_hub_download
3from stable_baselines3 import PPO
4
5REPO_ID = "bestak/uav-navigation-sasp"
6
7# 1. Download and load the feature extractor (pure PyTorch, no repo import needed)
8fe_path = hf_hub_download(REPO_ID, "feature_extractor.py")
9spec = importlib.util.spec_from_file_location("_fe", fe_path)
10mod = importlib.util.module_from_spec(spec)
11sys.modules["_fe"] = mod
12spec.loader.exec_module(mod)
13
14# 1b. Stub out drone_navigation so cloudpickle can resolve ALL saved class references
15# (lr_schedule, policy_kwargs, etc.) without the package being installed.
16import types as _types
17for _name in ["drone_navigation", "drone_navigation.models",
18 "drone_navigation.models.feature_extractor_aerial",
19 "drone_navigation.models.feature_extractor_landuse"]:
20 sys.modules.setdefault(_name, _types.ModuleType(_name))
21sys.modules["drone_navigation.models.feature_extractor_aerial"].AerialFeaturesExtractor = mod.AerialFeaturesExtractor
22
23# 2. Load the model -- inject the extractor class so cloudpickle can resolve it
24model = PPO.load(
25 hf_hub_download(REPO_ID, "best_model.zip"),
26 custom_objects={
27 "features_extractor_class": mod.AerialFeaturesExtractor,
28 },
29 device="cpu",
30)
31
32# 3. Run a single forward pass with a dummy observation
33obs = {
34 "camera": np.zeros((4, 84, 84, 3), dtype=np.uint8),
35 "visited_mask": np.zeros((4, 84, 84), dtype=np.uint8),
36 "goal_info": np.zeros(24, dtype=np.float32),
37 "saliency": np.zeros((4, 84, 84), dtype=np.uint8),
38}
39action, _ = model.predict(obs, deterministic=True)
40print("Action:", action)
1pip install git+https://gitlab.ciirc.cvut.cz/bestavoj/information-driven-uav-navigation.git
2# also requires map data -- see the repo README for data preparation
1from huggingface_hub import hf_hub_download
2from stable_baselines3 import PPO
3from drone_navigation.config.experiment_config import ExperimentConfig
4from drone_navigation.envs.factory import create_env
5
6REPO_ID = "bestak/uav-navigation-sasp"
7
8# When drone_navigation is installed, the extractor class resolves automatically
9model = PPO.load(hf_hub_download(REPO_ID, "best_model.zip"), device="cpu")
10
11cfg = ExperimentConfig.from_json(hf_hub_download(REPO_ID, "config.json"))
12cfg.n_envs = 1
13env = create_env(cfg)
14
15obs, _ = env.reset()
16for _ in range(cfg.max_steps):
17 action, _ = model.predict(obs, deterministic=True)
18 obs, reward, terminated, truncated, info = env.step(action)
19 if terminated or truncated:
20 print("Episode done. Target reached:", info.get("is_target_reached"))
21 break
22
23env.close()
1git clone https://gitlab.ciirc.cvut.cz/bestavoj/information-driven-uav-navigation.git
2cd information-driven-uav-navigation
3uv sync
4drone-train-rl --env_type aerial_grid ...
1@misc{information-driven-uav-navigation,
2 author = {Bestak, Vojtech},
3 title = {Information-Driven Visual Navigation for UAVs using Deep Reinforcement Learning},
4 year = {2026},
5 url = {https://gitlab.ciirc.cvut.cz/bestavoj/information-driven-uav-navigation}
6}