Skip to content

Commit f121b87

Browse files
committed
Add YOLOv9 as a proper Git submodule
0 parents  commit f121b87

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2612
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "yolov9"]
2+
path = yolov9
3+
url = https://github.com/WongKinYiu/yolov9.git

adaptive_carla_rl.egg-info/PKG-INFO

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Metadata-Version: 2.4
2+
Name: adaptive-carla-rl
3+
Version: 0.1
4+
Requires-Dist: torch
5+
Requires-Dist: torchvision
6+
Requires-Dist: torchaudio
7+
Requires-Dist: numpy
8+
Requires-Dist: opencv-python
9+
Requires-Dist: gymnasium
10+
Requires-Dist: stable-baselines3
11+
Requires-Dist: transformers
12+
Requires-Dist: pyyaml
13+
Requires-Dist: matplotlib
14+
Requires-Dist: pandas
15+
Requires-Dist: tensorboard
16+
Requires-Dist: scipy
17+
Requires-Dist: tqdm
18+
Requires-Dist: pillow
19+
Requires-Dist: requests
20+
Requires-Dist: cloudpickle
21+
Requires-Dist: typing-extensions
22+
Requires-Dist: jupyter
23+
Requires-Dist: ipython
24+
Requires-Dist: pytest
25+
Requires-Dist: black
26+
Requires-Dist: flake8
27+
Requires-Dist: seaborn
28+
Dynamic: requires-dist
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
setup.py
2+
adaptive_carla_rl.egg-info/PKG-INFO
3+
adaptive_carla_rl.egg-info/SOURCES.txt
4+
adaptive_carla_rl.egg-info/dependency_links.txt
5+
adaptive_carla_rl.egg-info/requires.txt
6+
adaptive_carla_rl.egg-info/top_level.txt
7+
core/__init__.py
8+
core/adaptive_roi.py
9+
core/hybrid_detector.py
10+
core/marl_env.py
11+
core/multi_detector.py
12+
core/nas_controller.py
13+
core/ssd_detector.py
14+
core/vit_encoder.py
15+
training/__init__.py
16+
training/callbacks.py
17+
training/curriculum.py
18+
training/meta_trainer.py
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
torch
2+
torchvision
3+
torchaudio
4+
numpy
5+
opencv-python
6+
gymnasium
7+
stable-baselines3
8+
transformers
9+
pyyaml
10+
matplotlib
11+
pandas
12+
tensorboard
13+
scipy
14+
tqdm
15+
pillow
16+
requests
17+
cloudpickle
18+
typing-extensions
19+
jupyter
20+
ipython
21+
pytest
22+
black
23+
flake8
24+
seaborn
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
core
2+
training

assets/carla.png

168 KB
Loading

configs/defaults.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Default config for the RL agent in the autonomous driving environment
2+
training:
3+
total_timesteps: 1000000
4+
batch_size: 64
5+
n_steps: 2048
6+
gamma: 0.99
7+
learning_rate: 0.0003
8+
ent_coef: 0.01
9+
clip_range: 0.2
10+
n_epochs: 10
11+
gae_lambda: 0.95
12+
13+
environment:
14+
frame_skip: 1
15+
max_episode_steps: 1000
16+
obs_stack: 3
17+
reward_config:
18+
detection_reward: 0.1
19+
fps_reward: 0.05
20+
collision_penalty: -1.0
21+
success_reward: 1.0
22+
23+
detector:
24+
ssd:
25+
conf_thresh: 0.5
26+
model: "ssd300_vgg16"
27+
weights: "DEFAULT"
28+
yolo:
29+
conf_thresh: 0.5
30+
iou_thresh: 0.45
31+
weights: "yolov9-c.pt"
32+
img_size: 640
33+
34+
roi:
35+
min_size: 0.2
36+
max_size: 0.8
37+
overlap_thresh: 0.5

configs/highway.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Highway driving scenario configuration
2+
environment:
3+
scenario: "highway"
4+
town: "Town07"
5+
weather:
6+
- "ClearNoon"
7+
- "ClearSunset"
8+
- "WetNoon"
9+
- "SoftRainNoon"
10+
11+
# Traffic parameters
12+
num_vehicles: 80
13+
num_pedestrians: 0
14+
vehicle_types:
15+
- "vehicle.audi.a2"
16+
- "vehicle.audi.etron"
17+
- "vehicle.audi.tt"
18+
- "vehicle.bmw.grandtourer"
19+
- "vehicle.chevrolet.impala"
20+
- "vehicle.dodge.charger_police"
21+
- "vehicle.ford.mustang"
22+
- "vehicle.jeep.wrangler_rubicon"
23+
- "vehicle.lincoln.mkz2017"
24+
- "vehicle.mercedes.coupe"
25+
- "vehicle.mini.cooperst"
26+
- "vehicle.nissan.micra"
27+
- "vehicle.nissan.patrol"
28+
- "vehicle.seat.leon"
29+
- "vehicle.tesla.cybertruck"
30+
- "vehicle.tesla.model3"
31+
- "vehicle.toyota.prius"
32+
- "vehicle.volkswagen.t2"
33+
34+
# Road characteristics
35+
junction_density: 0.1
36+
lane_width: 3.5
37+
speed_limit: 120 # km/h
38+
39+
# Object detection challenges
40+
occlusion_probability: 0.1
41+
small_object_scale: 0.3
42+
high_speed_objects: true
43+
44+
# Reward configuration
45+
reward_config:
46+
detection_reward: 1.2
47+
fps_reward: 0.7
48+
collision_penalty: -20.0
49+
pedestrian_detection_bonus: 0.0
50+
traffic_light_penalty: 0.0
51+
lane_invasion_penalty: -5.0
52+
success_reward: 30.0
53+
time_penalty: -0.05
54+
high_speed_detection_bonus: 1.5
55+
56+
# Episode configuration
57+
max_episode_steps: 3000
58+
success_conditions:
59+
distance_traveled: 5000
60+
time_without_collision: 300
61+
min_detection_accuracy: 0.65
62+
63+
# Perception parameters
64+
perception:
65+
# Detection thresholds
66+
min_pedestrian_confidence: 0.0
67+
min_vehicle_confidence: 0.3
68+
min_traffic_light_confidence: 0.0
69+
70+
# Region of interest defaults
71+
roi:
72+
default: [0.1, 0.3, 0.9, 0.7]
73+
attention_scale: 2.0
74+
75+
# Detector switching thresholds
76+
switch_to_yolo_when:
77+
fps_below: 20
78+
vehicles_above: 15
79+
80+
switch_to_detr_when:
81+
accuracy_below: 0.6
82+
small_objects_above: 1
83+
84+
# Computational constraints
85+
computational:
86+
max_inference_time: 30
87+
target_fps: 20
88+
energy_budget: 8000

configs/urban.yaml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Urban driving scenario configuration
2+
environment:
3+
scenario: "urban"
4+
town: "Town10HD"
5+
weather:
6+
- "ClearNoon"
7+
- "WetNoon"
8+
- "HardRainNoon"
9+
- "ClearSunset"
10+
11+
# Traffic parameters
12+
num_vehicles: 50
13+
num_pedestrians: 100
14+
vehicle_types:
15+
- "vehicle.audi.tt"
16+
- "vehicle.bmw.grandtourer"
17+
- "vehicle.citroen.c3"
18+
- "vehicle.dodge.charger_police"
19+
- "vehicle.ford.mustang"
20+
- "vehicle.mercedes.coupe"
21+
- "vehicle.mini.cooperst"
22+
- "vehicle.nissan.micra"
23+
- "vehicle.nissan.patrol"
24+
- "vehicle.seat.leon"
25+
- "vehicle.tesla.model3"
26+
- "vehicle.toyota.prius"
27+
- "vehicle.volkswagen.t2"
28+
29+
pedestrian_types:
30+
- "walker.pedestrian.0001"
31+
- "walker.pedestrian.0002"
32+
- "walker.pedestrian.0003"
33+
- "walker.pedestrian.0004"
34+
- "walker.pedestrian.0005"
35+
- "walker.pedestrian.0006"
36+
- "walker.pedestrian.0007"
37+
- "walker.pedestrian.0008"
38+
- "walker.pedestrian.0009"
39+
- "walker.pedestrian.0010"
40+
41+
# Road complexity
42+
junction_density: 0.8 # High density of intersections
43+
lane_width: 3.0 # Narrower lanes
44+
speed_limit: 50 # km/h
45+
46+
# Object detection challenges
47+
occlusion_probability: 0.3
48+
small_object_scale: 0.7
49+
50+
# Reward configuration
51+
reward_config:
52+
detection_reward: 1.0
53+
fps_reward: 0.3
54+
collision_penalty: -15.0
55+
pedestrian_detection_bonus: 2.0
56+
traffic_light_penalty: -5.0
57+
lane_invasion_penalty: -3.0
58+
success_reward: 20.0
59+
time_penalty: -0.1
60+
61+
# Episode configuration
62+
max_episode_steps: 2000 # ~5 minutes at 10fps
63+
success_conditions:
64+
distance_traveled: 1000 # meters
65+
time_without_collision: 180 # seconds
66+
min_detection_accuracy: 0.75 # mAP
67+
68+
# Perception parameters
69+
perception:
70+
# Detection thresholds
71+
min_pedestrian_confidence: 0.5
72+
min_vehicle_confidence: 0.4
73+
min_traffic_light_confidence: 0.6
74+
75+
# Region of interest defaults
76+
roi:
77+
default: [0.2, 0.2, 0.8, 0.8] # [left, top, right, bottom]
78+
attention_scale: 1.5
79+
80+
# Detector switching thresholds
81+
switch_to_yolo_when:
82+
fps_below: 15
83+
vehicles_above: 10
84+
pedestrians_above: 5
85+
86+
switch_to_detr_when:
87+
accuracy_below: 0.65
88+
small_objects_above: 3
89+
90+
# Computational constraints
91+
computational:
92+
max_inference_time: 50 # ms
93+
target_fps: 15
94+
energy_budget: 5000 # mJ per episode

0 commit comments

Comments
 (0)