diff --git a/model_examples/BEVFormer/requirements.txt b/model_examples/BEVFormer/requirements.txt index 3c257f61357223dc39b80ba064c0c1af93adbb9e..2efcae87979b3554348267204bbb0a9178fb4d04 100644 --- a/model_examples/BEVFormer/requirements.txt +++ b/model_examples/BEVFormer/requirements.txt @@ -5,4 +5,5 @@ opencv-python-headless==4.11.0.86 ipython seaborn attrs -psutil \ No newline at end of file +psutil +fsspec==2025.2.0 \ No newline at end of file diff --git a/model_examples/BEVFormer/requirements_pytorch2.6.txt b/model_examples/BEVFormer/requirements_pytorch2.6.txt index 6ebe525dedcfa253c1fef0c8b42aaf0c6d8ea5e0..15a4845b2ffe460f51da16ff344783de03742e32 100644 --- a/model_examples/BEVFormer/requirements_pytorch2.6.txt +++ b/model_examples/BEVFormer/requirements_pytorch2.6.txt @@ -5,4 +5,5 @@ seaborn attrs psutil opencv-python==4.8.0.76 -opencv-python-headless==4.11.0.86 \ No newline at end of file +opencv-python-headless==4.11.0.86 +fsspec==2025.2.0 \ No newline at end of file diff --git a/model_examples/MapTR/requirement.txt b/model_examples/MapTR/requirement.txt index bb50ec18015c5735a1d48acd86d5fa0f4ffc3f13..c771718cca3028348cd77d95e16510c68a38146a 100644 --- a/model_examples/MapTR/requirement.txt +++ b/model_examples/MapTR/requirement.txt @@ -7,4 +7,5 @@ shapely==1.8.5.post1 av2==0.2.1 numba==0.58.1 numpy==1.23.0 -ipython==8.12.3 \ No newline at end of file +ipython==8.12.3 +fsspec==2025.2.0 \ No newline at end of file diff --git a/model_examples/MapTR/requirements_pytorch2.6.txt b/model_examples/MapTR/requirements_pytorch2.6.txt index a84cb86c042f3ce98867563db7e3458838f92f43..89642b18dbab09c60b2025afc47a82087c13db87 100644 --- a/model_examples/MapTR/requirements_pytorch2.6.txt +++ b/model_examples/MapTR/requirements_pytorch2.6.txt @@ -9,4 +9,5 @@ numba==0.58.1 numpy==1.23.0 ipython==8.12.3 opencv-python==4.8.0.76 -opencv-python-headless==4.11.0.86 \ No newline at end of file +opencv-python-headless==4.11.0.86 +fsspec==2025.2.0 \ No newline at end of file diff --git a/model_examples/StreamPETR/README.md b/model_examples/StreamPETR/README.md index a59612954d919575a400c2be2e0c858135baca7f..27cba8b87d2377fba93cfe04be32929f6bfa6ab4 100644 --- a/model_examples/StreamPETR/README.md +++ b/model_examples/StreamPETR/README.md @@ -225,12 +225,7 @@ pip install -e MindSpeed ``` cd {DrivingSDK_root_dir}/model_examples/StreamPETR cp -rf test StreamPETR -mv StreamPETR/test/testfunc.sh StreamPETR -mv StreamPETR/test/backfunc.sh StreamPETR -chmod 777 StreamPETR/testfunc.sh -chmod 777 StreamPETR/backfunc.sh ``` -最后将环境路径加入testfunc.sh和backfunc.sh中的第二行 file_path 10. 编译优化 (1)python编译优化 diff --git a/model_examples/StreamPETR/streampetr.patch b/model_examples/StreamPETR/streampetr.patch index d96a8d642edc0f7c8e3169f47ef15f08fb04639f..2372d5e6894afc8499de79abd8067ea7a6ca43ac 100644 --- a/model_examples/StreamPETR/streampetr.patch +++ b/model_examples/StreamPETR/streampetr.patch @@ -587,7 +587,7 @@ new file mode 100644 index 0000000..235a6a1 --- /dev/null +++ b/patch/requirements.txt -@@ -0,0 +1,15 @@ +@@ -0,0 +1,16 @@ +numpy==1.23.5 +pyyaml==6.0.2 +mmsegmentation==0.30.0 @@ -603,6 +603,7 @@ index 0000000..235a6a1 +mmengine==0.9.1 +torchvision==0.9.1 +setuptools==69.5.1 ++fsspec==2025.2.0 \ No newline at end of file diff --git a/patch/text.py b/patch/text.py new file mode 100644 diff --git a/model_examples/StreamPETR/test/backfunc.sh b/model_examples/StreamPETR/test/backfunc.sh deleted file mode 100644 index e525d361074fe969243b1f80ba24f7faecfb08fd..0000000000000000000000000000000000000000 --- a/model_examples/StreamPETR/test/backfunc.sh +++ /dev/null @@ -1,10 +0,0 @@ -python3 -c " -file_path = '/usr/local/lib/python3.8/site-packages/mmcv_full-1.7.2-py3.8-linux-aarch64.egg/mmcv/parallel/_functions.py' -with open(file_path, 'r') as f: - lines = f.readlines() -lines[78] = ' streams = [_get_stream(device) for device in target_gpus]\n' -del lines[66:70] -with open(file_path, 'w') as f: - f.writelines(lines) -" - diff --git a/model_examples/StreamPETR/test/testfunc.sh b/model_examples/StreamPETR/test/testfunc.sh deleted file mode 100644 index f35970fef099f96e1797b8614aa8a590de60cfc0..0000000000000000000000000000000000000000 --- a/model_examples/StreamPETR/test/testfunc.sh +++ /dev/null @@ -1,16 +0,0 @@ -python3 -c " -file_path = '/usr/local/lib/python3.8/site-packages/mmcv_full-1.7.2-py3.8-linux-aarch64.egg/mmcv/parallel/_functions.py' -with open(file_path, 'r') as f: - lines = f.readlines() -lines[74] = ' streams = [safe_get_stream(device) for device in target_gpus]\n' - -function_code = [ - 'def safe_get_stream(device):\\n', - ' if isinstance(device, int):\\n', - ' device = torch.device(f\'cuda:{device}\')\\n', - ' return _get_stream(device)\\n' - ] -lines[66:66] = function_code -with open(file_path, 'w') as f: - f.writelines(lines) -" diff --git a/model_examples/StreamPETR/test/train_8p.sh b/model_examples/StreamPETR/test/train_8p.sh index 3418b982400e124066a2b50b45bc9dd4e0ff57ca..8b216de6b52e4ff75b3991b4a2d482a0b308dae9 100644 --- a/model_examples/StreamPETR/test/train_8p.sh +++ b/model_examples/StreamPETR/test/train_8p.sh @@ -72,17 +72,10 @@ bash tools/dist_train.sh projects/configs/StreamPETR/stream_petr_vov_flash_800_b >$cur_path/test/output/${ASCEND_DEVICE_ID}/train1_${ASCEND_DEVICE_ID}.log 2>&1 & wait -#运行脚本修改_function文件,加入代码定义新函数获取device,使得运行eval脚本 -bash testfunc.sh - bash tools/dist_test.sh projects/configs/StreamPETR/stream_petr_vov_flash_800_bs2_seq_24e.py work_dirs/report_vision/latest.pth 8 --eval bbox \ >$cur_path/test/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log 2>&1 & wait -#运行脚本退回,使_function文件退回至初始内容 -bash backfunc.sh - - # 训练结束时间,不需要修改 end_time=$(date +%s)