Skip to content

Commit

Permalink
feat(model): upload model pretrained weight for people to test.
Browse files Browse the repository at this point in the history
setup lib with wx permission.
model weight check issue: #14
  • Loading branch information
Kin-Zhang committed Nov 14, 2023
1 parent 5f06ebe commit 39b5a5f
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 11 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ python team_code/benchmark/transfuser/train.py --device 'cuda:0'

This part is for evaluating to result or leaderboard, you can also download the modal file and try upload to leaderboard through leaderbaord branch. The whole process is the same way like generate dataset

1. Download or Train a model file saved to `log/mmfn_img` or `log/mmfn_vec` or `log/mmfn_rad`
1. Download or Train a model file saved to `log/mmfn_img` or `log/mmfn_vec` or `log/mmfn_rad`. Pretrained weight can [download here](https://hkustconnect-my.sharepoint.com/:f:/g/personal/qzhangcb_connect_ust_hk/EvMM_DMzBppNvC_Scew4-SgB4RWvI-uebxZ1AiIgng9a5g), check [issue](https://github.com/Kin-Zhang/mmfn/issues/14) note it's not the best weight or maybe better than papers. Try train on your own dataset for fair comparsion.
3. Keep `config/eval.yaml` same as `collect.yaml` but modified model file location as first step side
3. Keep `config/eval.yaml` same as `collect.yaml` but modified model file location as first step side. The first one will take 1-2 mins because we are in traffic light. Be patience..
```bash
routes: 'leaderboard/data/only_one_town.xml'
Expand All @@ -207,7 +207,7 @@ This part is for evaluating to result or leaderboard, you can also download the
4. Running eval python script and see result json file in `result` Folder
```bash
python run_steps/phase0_run_eval.py
python run_steps/phase0_run_eval.py --config-name=eval
```
If all setting is correct, you will see eval like this one, pls remember to change route to `only_one_town` for debug.
Expand All @@ -231,9 +231,4 @@ If all setting is correct, you will see eval like this one, pls remember to chan
This implementation is based on codes from several repositories. Thanks for these authors who kindly open-sourcing their work to the community. Please see our paper reference part to get more information on our reference
- [LBC](https://github.com/dotchen/LearningByCheating), [WorldOnRails](https://github.com/dotchen/WorldOnRails)
- [Transfuser](https://github.com/autonomousvision/transfuser)
- [CARLA Leaderboard](https://github.com/carla-simulator/leaderboard), [Scenario Runner](https://github.com/carla-simulator/scenario_runner)

- [carla-brid-view](https://github.com/deepsense-ai/carla-birdeye-view)
- [pylot](https://github.com/erdos-project/pylot)
❤️: [LBC](https://github.com/dotchen/LearningByCheating), [WorldOnRails](https://github.com/dotchen/WorldOnRails), [Transfuser](https://github.com/autonomousvision/transfuser), [carla-brid-view](https://github.com/deepsense-ai/carla-birdeye-view), [pylot](https://github.com/erdos-project/pylot), [CARLA Leaderboard 1.0](https://github.com/carla-simulator/leaderboard), [Scenario Runner 1.0](https://github.com/carla-simulator/scenario_runner)
Binary file added assets/readme/eval_mmfn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion run_steps/config/agent_config/e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
model_path: 'log/mmfn_vec'
model_path: 'log/vec_1deaeqqx'
town: null
route_id: null

Expand Down
47 changes: 47 additions & 0 deletions run_steps/config/eval.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# please remember to change this!!! TODO or will change by modi
absolute_path: '/home/kin/mmfn'
carla_sh_path: '/home/kin/CARLA_0.9.10.1/CarlaUE4.sh'

host: 'localhost'
port: 2000
trafficManagerPort: 0
if_open_carla: True # if not pls check the port is correct
record: ''
repetitions: 1
resume: False
checkpoint: None

# Seed used by the TrafficManager (default: 0)
trafficManagerSeed: 0
timeout: 20000
no_rendering: False

# ============== for all route test=============== #
debug: False

# only for debug ===> or just test the agent
routes: 'leaderboard/data/only_one_town.xml'
# towns: ['Town01', 'Town03', 'Town06', 'Town07']
# towns: ['Town02', 'Town04', 'Town05', 'Town10']
# routes: 'leaderboard/data/training_routes/'

scenarios: 'leaderboard/data/all_towns_traffic_scenarios.json'

track: 'MAP' # 'SENSORS'

# ====================== Expert Agent ========================= #
# agent: 'team_code/expert_agent/human_agent.py'
# agent: 'team_code/expert_agent/auto_pilot.py'
# agent: 'team_code/expert_agent/mmfn_pilot.py'
# defaults:
# - agent_config: expert

# agent: 'team_code/expert_agent/mmfn_ppilot.py'
# defaults:
# - agent_config: force_expert
# ====================== E2E Agent ========================= #
# agent: 'team_code/e2e_agent/mmfn_radar.py'
agent: 'team_code/e2e_agent/mmfn_vectornet.py'
# agent: 'team_code/e2e_agent/mmfn_imgnet.py'
defaults:
- agent_config: e2e # pls name the model as 'best_model.pth'
1 change: 1 addition & 0 deletions scripts/setup_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ elif (( $(echo "$ubuntu_version == 16.04" |bc -l) )); then
else
echo "There is no version package for: $ubuntu_version"
fi
chmod +wx assets/package/*
2 changes: 1 addition & 1 deletion team_code/e2e_agent/mmfn_vectornet.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def tick(self, input_data, timestamp):
[np.cos(theta), -np.sin(theta)],
[np.sin(theta), np.cos(theta)]
])
print(f"step: {self.step} =======> from ({pos[0]:.2f} ,{pos[1]:.2f}),target:({next_wp[0]:.2f},{next_wp[1]:.2f})")
# print(f"step: {self.step} =======> from ({pos[0]:.2f} ,{pos[1]:.2f}),target:({next_wp[0]:.2f},{next_wp[1]:.2f})")
local_command_point = np.array([next_wp[0]-pos[0], next_wp[1]-pos[1]])
local_command_point = R.T.dot(local_command_point)
result['target_point'] = tuple(local_command_point)
Expand Down

0 comments on commit 39b5a5f

Please sign in to comment.