Closed sjtuljw520 closed 2 years ago
@sjtuljw520 There have been multiple reports of this. But I really don't know why because on my machine things are fine.
https://github.com/voldemortX/pytorch-auto-drive/issues/76#issuecomment-1114438016
Thanks for replying. I have solved this by adding this code in the config file: import sys sys.path.append('/home/xxx/xxx/pytorch-auto-drive')
But when I run the "main_lanedet.py", this code should be remove otherwise other error will occur.
@sjtuljw520 You can simply use the with
context of importmagician. This way the path will only be changed within the with
context and not affecting other part of the codes.
The main problem should be that ./
is not /home/xxx/xxx/pytorch-auto-drive
for reasons unknown.
@sjtuljw520 You can simply use the
with
context of importmagician. This way the path will only be changed within thewith
context and not affecting other part of the codes.
Thank you. Using the "with' context of importmagician works, but when running the "main_lanedet.py", this code should be remove too, otherwise, error will occur.
@sjtuljw520 This should be fixed by #86 . Feel free to test and reopen if the problem persists.
when I tried this: python tools/vis/lane_img_dir.py --image-path=test_image/culane --keypoint-path=test_image/culane --image-suffix=.jpg --keypoint-suffix=.lines.txt --save-path=test_image/culane/culane_res --config=configs/lane_detection/bezierlanenet/resnet34_culane_aug1b.py
obtaning this error: Traceback (most recent call last): File "/home/liujianwei/project/opensource/pytorch-auto-drive/tools/vis/lane_img_dir.py", line 72, in
cfg = read_config(args.config)
File "/home/liujianwei/project/opensource/pytorch-auto-drive/utils/args.py", line 57, in read_config
module = SourceFileLoader(module_name, config_path).load_module()
File "", line 529, in _check_name_wrapper
File "", line 1029, in load_module
File "", line 854, in load_module
File "", line 274, in _load_module_shim
File "", line 711, in _load
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "configs/lane_detection/bezierlanenet/resnet34_culane_aug1b.py", line 2, in
from configs.lane_detection.common.datasets.culane_bezier import dataset
ModuleNotFoundError: No module named 'configs.lane_detection'
PS: when I run the main_lanedet.py to test, it works.