Comments (5)
This error usually occurs when the imported config file causes an error. This exception will cause the temp file to be cleaned up in advance.
To debug this problem, directly run
python3 config/Stereo3D.py
to identify the error caused by this config file.
from visualdet3d.
1、运行 python3 config/Stereo3D.py 报错,
Traceback (most recent call last):
File "config/Stereo3D.py", line 29, in
os.mkdir(path.project_path)
FileNotFoundError: [Errno 2] No such file or directory: '/path/to/visualDet3D/workdirs'
2、可能是我的路径没有改对。按照自己的理解,做成以下这样,麻烦您看下是否有误!谢谢~
这是README中的一段:
important paths to modify in config :
- cfg.path.data_path: Path to KITTI training data. We expect calib, image_2, image_3, label_2 being the subfolder (directly unzipping the downloaded zips will be fine)
- cfg.path.test_path: Path to KITTI testing data. We expect calib, image_2 being the subfolder.
- cfg.path.visualDet3D_path: Path to the "visualDet3D" directorty of the current repo
- cfg.path.project_path: Path to the workdirs of the projects (will have temp_outputs, log, checkpoints)
首先,执行以下命令,
cd config
cp Stereo3D_example Stereo3D.py
在执行nano $CONFIG_FILE.py时,没有改动路径(完全按照文件上的路径)。路径代码如下:
path
path = edict()
path.data_path = "/data/kitti_obj/training" # used in visualDet3D/data/.../dataset
path.test_path = "/data/kitti_obj/testing" # used in visualDet3D/data/.../dataset
path.visualDet3D_path = "/path/to/visualDet3D/visualDet3D" # The path should point to the inner subfolder
path.project_path = "/path/to/visualDet3D/workdirs" # or other path for pickle files, checkpoints, tensorboard logging and output files.
if not os.path.isdir(path.project_path):
os.mkdir(path.project_path)
path.project_path = os.path.join(path.project_path, 'Stereo3D')
if not os.path.isdir(path.project_path):
os.mkdir(path.project_path)
KITTI数据集放在visualDet3D/visualDet3D/data/kitti_obj/training和visualDet3D/visualDet3D/data/kitti_obj/testing下,在training和testing文件夹下,执行unzip指令后,又分别生成training和testing2个文件夹。界面如下:
然后,执行cd ..和./launcher/det_precompute.sh config/Stereo3D.py train命令后,报错。(报错和上面一样)
from visualdet3d.
与document里面描述的一致,你需要修改cfg里面的path。 修改为你数据以及本repo的绝对路径。
kitti数据不需要放在本repo里面,你只需要把repo放在能访问的路径上,然后 cfg.path.data_path / cfg.path.test_path 指向这数据的绝对路径就可以了。
实验数据文件夹的构建都是基于cfg里面的文件路径名字的,所以你需要把路径改为代码在你电脑上的实际存放路径。否则就会尝试在 /path/to/visualDet3D这样的位置存储数据(但是显然不存在没有这样的实际路径)
from visualdet3d.
谢谢解答!已经成功解决问题啦~
现在出现了新的问题,麻烦您解答以下~
1../disparity_precompute.sh config/$CONFIG_FILE.py $IsUsingPointCloud 这条指令,当输入./disparity_precompute.sh config/Stereo3D.py IsUsingPointCloud时,报错如下:(我不太理解$IsUsingPointCloud的含义)
start reading training data
0it [00:00, ?it/s]
Traceback (most recent call last):
File "scripts/disparity_compute.py", line 149, in
Fire(main)
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/fire/core.py", line 475, in Fire
component, remaining_args = CallAndUpdateTrace(
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/fire/core.py", line 691, in CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "scripts/disparity_compute.py", line 144, in main
compute_dispairity_for_split(cfg, train_names, data_root_dir, output_dict, 'training', time_display_inter, use_point_cloud)
File "scripts/disparity_compute.py", line 81, in compute_dispairity_for_split
calib, image, right_image, label, velo = data_frame.read_data()
File "/home/ubuntu/WANG/visualDet3D/visualDet3D/data/kitti/kittidata.py", line 245, in read_data
pc = read_pc_from_bin(self.velodyne_path) if self.output_dict["velodyne"] else None
File "/home/ubuntu/WANG/visualDet3D/visualDet3D/data/kitti/utils.py", line 11, in read_pc_from_bin
p = np.fromfile(bin_path, dtype=np.float32).reshape(-1, 4)
FileNotFoundError: [Errno 2] No such file or directory: '../../WANG/object/training/velodyne/000000.bin'
2.运行./launchers/train.sh config/Stereo3D.py 0 Stereo3D时,报错如下:(我不太理解0的含义,这个指的什么呢?)
Nnumber of GPUs being 1, will directly launch:
python3 train --experiment_name=Stereo3D
clean up the recorder directory of ../../WANG/visualDet3D/workdirs/Stereo3D/log/Stereo3Dconfig=config/Stereo3D.py
2023-01-23 15:04:55.724180: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-01-23 15:04:56.244247: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/cv2/../../lib64:
2023-01-23 15:04:56.244297: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/cv2/../../lib64:
2023-01-23 15:04:56.244305: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
-1
number of trained parameters of the model: 107577232
Found evaluate function evaluate_kitti_obj
Num training images: 7397
[ WARN:[email protected]] global loadsave.cpp:244 findDecoder imread('../../WANG/visualDet3D/workdirs/Stereo3D/output/training/disp/P2005108.png'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 findDecoder imread('../../WANG/visualDet3D/workdirs/Stereo3D/output/training/disp/P2000540.png'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 findDecoder imread('../../WANG/visualDet3D/workdirs/Stereo3D/output/training/disp/P2005733.png'): can't open/read file: check file path/integrity
Traceback (most recent call last):
File "scripts/train.py", line 199, in
Fire(main)
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/fire/core.py", line 475, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "scripts/train.py", line 149, in main
for iter_num, data in enumerate(dataloader_train):
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in next
data = self._next_data()
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1199, in _next_data
return self._process_data(data)
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1225, in _process_data
data.reraise()
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/torch/_utils.py", line 429, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ubuntu/miniconda3/envs/yolo3d/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ubuntu/WANG/visualDet3D/visualDet3D/data/kitti/dataset/stereo_dataset.py", line 121, in getitem
disparity = disparity / 16.0
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
from visualdet3d.
I have solved it successfully.Thank you!
from visualdet3d.
Related Issues (20)
- Pretrained weights HOT 2
- Dockerfile HOT 1
- cpu HOT 1
- Training on custom dataset with shifted camera angle HOT 1
- Template problem HOT 4
- Mismatch between 2D bbox and projected 3D bbox after affine transformation HOT 2
- Support for mono 3D random resize augmentation HOT 4
- A problem with pretrain dla model HOT 6
- Preprocessing another data HOT 7
- How to Create Custom DATA Like Kitti HOT 1
- How to build ops (deform convs and iou3d)?
- 请问大佬使用的双目匹配方法和stereo3d.md文件的作用 HOT 3
- 请问作者有没有检测视频和摄像头的代码 HOT 2
- About lack of dataset HOT 2
- which datasets to download?
- Inference on Nuscenes HOT 1
- The Version of pytorch /cuda HOT 1
- 自制的KITTI数据集训练闪退问题 HOT 3
- Problem with allocating memory (CUDA out of memory) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from visualdet3d.