├── Modeling ├── VIL-100 │ ├── PLD │ │ └── code │ │ │ ├── libs │ │ │ ├── __init__.py │ │ │ ├── save_model.py │ │ │ └── video_memory.py │ │ │ ├── datasets │ │ │ └── __init__.py │ │ │ ├── models │ │ │ ├── __init__.py │ │ │ └── backbone.py │ │ │ ├── options │ │ │ └── __init__.py │ │ │ ├── tools │ │ │ └── __init__.py │ │ │ ├── evaluation │ │ │ ├── __init__.py │ │ │ ├── culane │ │ │ │ ├── CMakeFiles │ │ │ │ │ ├── progress.marks │ │ │ │ │ ├── cmake.check_cache │ │ │ │ │ ├── feature_tests.bin │ │ │ │ │ ├── 3.5.1 │ │ │ │ │ │ ├── CompilerIdC │ │ │ │ │ │ │ └── a.out │ │ │ │ │ │ ├── CompilerIdCXX │ │ │ │ │ │ │ └── a.out │ │ │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ │ │ ├── CMakeSystem.cmake │ │ │ │ │ │ └── CMakeCCompiler.cmake │ │ │ │ │ ├── culane_evaluator.dir │ │ │ │ │ │ ├── progress.make │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ ├── counter.cpp.o │ │ │ │ │ │ │ ├── spline.cpp.o │ │ │ │ │ │ │ ├── evaluate.cpp.o │ │ │ │ │ │ │ └── lane_compare.cpp.o │ │ │ │ │ │ ├── flags.make │ │ │ │ │ │ ├── cmake_clean.cmake │ │ │ │ │ │ ├── link.txt │ │ │ │ │ │ └── DependInfo.cmake │ │ │ │ │ ├── TargetDirectories.txt │ │ │ │ │ ├── feature_tests.c │ │ │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ │ │ └── Makefile.cmake │ │ │ │ ├── build │ │ │ │ │ ├── CMakeFiles │ │ │ │ │ │ ├── progress.marks │ │ │ │ │ │ ├── cmake.check_cache │ │ │ │ │ │ ├── feature_tests.bin │ │ │ │ │ │ ├── 3.10.2 │ │ │ │ │ │ │ ├── CompilerIdC │ │ │ │ │ │ │ │ └── a.out │ │ │ │ │ │ │ ├── CompilerIdCXX │ │ │ │ │ │ │ │ └── a.out │ │ │ │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ │ │ │ └── CMakeSystem.cmake │ │ │ │ │ │ ├── FindOpenMP │ │ │ │ │ │ │ ├── ompver_C.bin │ │ │ │ │ │ │ ├── OpenMPTryFlag.c │ │ │ │ │ │ │ ├── OpenMPTryFlag.cpp │ │ │ │ │ │ │ ├── ompver_CXX.bin │ │ │ │ │ │ │ ├── OpenMPCheckVersion.c │ │ │ │ │ │ │ └── OpenMPCheckVersion.cpp │ │ │ │ │ │ ├── culane_evaluator.dir │ │ │ │ │ │ │ ├── progress.make │ │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ │ ├── spline.cpp.o │ │ │ │ │ │ │ │ ├── counter.cpp.o │ │ │ │ │ │ │ │ ├── evaluate.cpp.o │ │ │ │ │ │ │ │ └── lane_compare.cpp.o │ │ │ │ │ │ │ ├── flags.make │ │ │ │ │ │ │ ├── link.txt │ │ │ │ │ │ │ ├── cmake_clean.cmake │ │ │ │ │ │ │ └── DependInfo.cmake │ │ │ │ │ │ ├── TargetDirectories.txt │ │ │ │ │ │ ├── feature_tests.c │ │ │ │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ │ │ │ └── Makefile.cmake │ │ │ │ │ └── cmake_install.cmake │ │ │ │ ├── evaluate │ │ │ │ ├── getopt │ │ │ │ │ ├── readme.txt │ │ │ │ │ ├── getopt.h │ │ │ │ │ └── getopt.c │ │ │ │ ├── run-lite.sh │ │ │ │ ├── calTotal.m │ │ │ │ ├── include │ │ │ │ │ ├── spline.hpp │ │ │ │ │ ├── lane_compare.hpp │ │ │ │ │ └── counter.hpp │ │ │ │ ├── cmake_install.cmake │ │ │ │ ├── run-full.sh │ │ │ │ ├── src │ │ │ │ │ └── lane_compare.cpp │ │ │ │ └── CMakeLists.txt │ │ │ └── evaluate_flow.py │ │ │ └── main.py │ ├── ILD_seg │ │ └── code │ │ │ ├── libs │ │ │ ├── __init__.py │ │ │ └── save_model.py │ │ │ ├── tools │ │ │ └── __init__.py │ │ │ ├── datasets │ │ │ └── __init__.py │ │ │ ├── evaluation │ │ │ ├── __init__.py │ │ │ └── evaluate.py │ │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── loss.py │ │ │ └── backbone.py │ │ │ ├── options │ │ │ ├── __init__.py │ │ │ └── args.py │ │ │ └── main.py │ └── ILD_coeff │ │ └── code │ │ ├── datasets │ │ └── __init__.py │ │ ├── libs │ │ ├── __init__.py │ │ └── save_model.py │ │ ├── models │ │ ├── __init__.py │ │ └── backbone.py │ │ ├── options │ │ ├── __init__.py │ │ └── args.py │ │ ├── tools │ │ └── __init__.py │ │ ├── evaluation │ │ ├── __init__.py │ │ └── culane │ │ │ ├── CMakeFiles │ │ │ ├── progress.marks │ │ │ ├── cmake.check_cache │ │ │ ├── feature_tests.bin │ │ │ ├── 3.5.1 │ │ │ │ ├── CompilerIdC │ │ │ │ │ └── a.out │ │ │ │ ├── CompilerIdCXX │ │ │ │ │ └── a.out │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ ├── CMakeSystem.cmake │ │ │ │ └── CMakeCCompiler.cmake │ │ │ ├── culane_evaluator.dir │ │ │ │ ├── progress.make │ │ │ │ ├── src │ │ │ │ │ ├── spline.cpp.o │ │ │ │ │ ├── counter.cpp.o │ │ │ │ │ ├── evaluate.cpp.o │ │ │ │ │ └── lane_compare.cpp.o │ │ │ │ ├── flags.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── link.txt │ │ │ │ └── DependInfo.cmake │ │ │ ├── TargetDirectories.txt │ │ │ ├── feature_tests.c │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ └── Makefile.cmake │ │ │ ├── build │ │ │ ├── CMakeFiles │ │ │ │ ├── progress.marks │ │ │ │ ├── cmake.check_cache │ │ │ │ ├── feature_tests.bin │ │ │ │ ├── FindOpenMP │ │ │ │ │ ├── OpenMPTryFlag.c │ │ │ │ │ ├── ompver_C.bin │ │ │ │ │ ├── OpenMPTryFlag.cpp │ │ │ │ │ ├── ompver_CXX.bin │ │ │ │ │ ├── OpenMPCheckVersion.c │ │ │ │ │ └── OpenMPCheckVersion.cpp │ │ │ │ ├── culane_evaluator.dir │ │ │ │ │ ├── progress.make │ │ │ │ │ ├── src │ │ │ │ │ │ ├── counter.cpp.o │ │ │ │ │ │ ├── spline.cpp.o │ │ │ │ │ │ ├── evaluate.cpp.o │ │ │ │ │ │ └── lane_compare.cpp.o │ │ │ │ │ ├── flags.make │ │ │ │ │ ├── link.txt │ │ │ │ │ ├── cmake_clean.cmake │ │ │ │ │ └── DependInfo.cmake │ │ │ │ ├── 3.10.2 │ │ │ │ │ ├── CompilerIdC │ │ │ │ │ │ └── a.out │ │ │ │ │ ├── CompilerIdCXX │ │ │ │ │ │ └── a.out │ │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ │ └── CMakeSystem.cmake │ │ │ │ ├── TargetDirectories.txt │ │ │ │ ├── feature_tests.c │ │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ │ └── Makefile.cmake │ │ │ └── cmake_install.cmake │ │ │ ├── evaluate │ │ │ ├── getopt │ │ │ ├── readme.txt │ │ │ ├── getopt.h │ │ │ └── getopt.c │ │ │ ├── run-lite.sh │ │ │ ├── calTotal.m │ │ │ ├── include │ │ │ ├── spline.hpp │ │ │ ├── lane_compare.hpp │ │ │ └── counter.hpp │ │ │ ├── cmake_install.cmake │ │ │ ├── run-full.sh │ │ │ ├── src │ │ │ └── lane_compare.cpp │ │ │ └── CMakeLists.txt │ │ └── main.py └── OpenLane-V │ ├── PLD │ └── code │ │ ├── libs │ │ ├── __init__.py │ │ ├── save_model.py │ │ └── video_memory.py │ │ ├── models │ │ ├── __init__.py │ │ └── backbone.py │ │ ├── tools │ │ └── __init__.py │ │ ├── datasets │ │ └── __init__.py │ │ ├── evaluation │ │ ├── __init__.py │ │ └── evaluate_flow.py │ │ ├── options │ │ └── __init__.py │ │ └── main.py │ ├── ILD_coeff │ └── code │ │ ├── libs │ │ ├── __init__.py │ │ └── save_model.py │ │ ├── tools │ │ └── __init__.py │ │ ├── datasets │ │ └── __init__.py │ │ ├── evaluation │ │ └── __init__.py │ │ ├── models │ │ ├── __init__.py │ │ └── backbone.py │ │ ├── options │ │ ├── __init__.py │ │ └── args.py │ │ └── main.py │ └── ILD_seg │ └── code │ ├── libs │ ├── __init__.py │ └── save_model.py │ ├── models │ ├── __init__.py │ ├── loss.py │ └── backbone.py │ ├── options │ ├── __init__.py │ └── args.py │ ├── tools │ └── __init__.py │ ├── datasets │ └── __init__.py │ ├── evaluation │ ├── __init__.py │ └── evaluate.py │ └── main.py ├── Preprocessing ├── VIL-100 │ ├── P02_SVD │ │ └── code │ │ │ ├── libs │ │ │ ├── __init__.py │ │ │ ├── prepare.py │ │ │ └── utils.py │ │ │ ├── datasets │ │ │ ├── __init__.py │ │ │ └── dataset_vil100.py │ │ │ ├── options │ │ │ ├── __init__.py │ │ │ └── args.py │ │ │ └── main.py │ ├── P00_data_processing │ │ └── code │ │ │ ├── libs │ │ │ ├── __init__.py │ │ │ ├── preprocess.py │ │ │ └── utils.py │ │ │ ├── options │ │ │ ├── __init__.py │ │ │ ├── args.py │ │ │ └── config.py │ │ │ └── main.py │ ├── P01_lane_representation │ │ └── code │ │ │ ├── libs │ │ │ ├── __init__.py │ │ │ ├── prepare.py │ │ │ └── utils.py │ │ │ ├── datasets │ │ │ ├── __init__.py │ │ │ └── dataset_vil100.py │ │ │ ├── options │ │ │ ├── __init__.py │ │ │ └── args.py │ │ │ └── main.py │ └── P03_video_based_datalist │ │ └── code │ │ ├── libs │ │ ├── __init__.py │ │ ├── utils.py │ │ └── preprocess.py │ │ ├── options │ │ ├── __init__.py │ │ ├── args.py │ │ └── config.py │ │ └── main.py └── OpenLane-V │ ├── P02_SVD │ └── code │ │ ├── datasets │ │ ├── __init__.py │ │ └── dataset_openlane.py │ │ ├── libs │ │ ├── __init__.py │ │ ├── prepare.py │ │ └── utils.py │ │ ├── options │ │ ├── __init__.py │ │ └── args.py │ │ └── main.py │ ├── P01_lane_representation │ └── code │ │ ├── libs │ │ ├── __init__.py │ │ ├── prepare.py │ │ └── utils.py │ │ ├── options │ │ ├── __init__.py │ │ └── args.py │ │ ├── datasets │ │ ├── __init__.py │ │ └── dataset_openlane.py │ │ └── main.py │ └── P03_video_based_datalist │ └── code │ ├── libs │ ├── __init__.py │ └── utils.py │ ├── options │ ├── __init__.py │ ├── args.py │ └── config.py │ └── main.py ├── Overview.PNG └── requirements.txt /Modeling/VIL-100/PLD/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P02_SVD/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/models/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/tools/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/tools/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/models/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/tools/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P02_SVD/code/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P02_SVD/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P02_SVD/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P02_SVD/code/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P02_SVD/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_coeff/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_coeff/code/tools/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/models/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/tools/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/models/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/tools/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/models/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P00_data_processing/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_coeff/code/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_coeff/code/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_coeff/code/models/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_coeff/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | # init 2 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P00_data_processing/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P01_lane_representation/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P03_video_based_datalist/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P01_lane_representation/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P01_lane_representation/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P03_video_based_datalist/code/libs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P01_lane_representation/code/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P01_lane_representation/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P03_video_based_datalist/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /Overview.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Overview.PNG -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P01_lane_representation/code/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P03_video_based_datalist/code/options/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | opencv-python 2 | imgaug 3 | pickle5 4 | tqdm==4.43.0 5 | p_tqdm==1.3.3 6 | Shapely 7 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/evaluate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/evaluate -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/evaluate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/evaluate -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/3.5.1/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/3.5.1/CompilerIdC/a.out -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/3.5.1/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/3.5.1/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/3.5.1/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/3.5.1/CompilerIdC/a.out -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | CMAKE_PROGRESS_3 = 3 4 | CMAKE_PROGRESS_4 = 4 5 | CMAKE_PROGRESS_5 = 5 6 | 7 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/3.10.2/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/3.10.2/CompilerIdC/a.out -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/FindOpenMP/ompver_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/FindOpenMP/ompver_C.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/3.5.1/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/3.5.1/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | CMAKE_PROGRESS_3 = 3 4 | CMAKE_PROGRESS_4 = 4 5 | CMAKE_PROGRESS_5 = 5 6 | 7 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/3.10.2/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/3.10.2/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/FindOpenMP/OpenMPTryFlag.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | int main() { 4 | #ifdef _OPENMP 5 | return 0; 6 | #else 7 | breaks_on_purpose 8 | #endif 9 | } 10 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/FindOpenMP/OpenMPTryFlag.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | int main() { 4 | #ifdef _OPENMP 5 | return 0; 6 | #else 7 | breaks_on_purpose 8 | #endif 9 | } 10 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/FindOpenMP/ompver_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/FindOpenMP/ompver_CXX.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | CMAKE_PROGRESS_3 = 3 4 | CMAKE_PROGRESS_4 = 4 5 | CMAKE_PROGRESS_5 = 5 6 | 7 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/FindOpenMP/OpenMPTryFlag.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | int main() { 4 | #ifdef _OPENMP 5 | return 0; 6 | #else 7 | breaks_on_purpose 8 | #endif 9 | } 10 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/FindOpenMP/ompver_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/FindOpenMP/ompver_C.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | CMAKE_PROGRESS_3 = 3 4 | CMAKE_PROGRESS_4 = 4 5 | CMAKE_PROGRESS_5 = 5 6 | 7 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/3.10.2/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/3.10.2/CompilerIdC/a.out -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/3.10.2/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/3.10.2/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/FindOpenMP/OpenMPTryFlag.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | int main() { 4 | #ifdef _OPENMP 5 | return 0; 6 | #else 7 | breaks_on_purpose 8 | #endif 9 | } 10 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/FindOpenMP/ompver_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/FindOpenMP/ompver_CXX.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/getopt/readme.txt: -------------------------------------------------------------------------------- 1 | For windows build, `getopt.c` and `getopt.h` are required. 2 | 3 | They are taken from the [iotivity](https://github.com/iotivity/iotivity) open source project, under Apache LICENSE 2.0. -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/getopt/readme.txt: -------------------------------------------------------------------------------- 1 | For windows build, `getopt.c` and `getopt.h` are required. 2 | 3 | They are taken from the [iotivity](https://github.com/iotivity/iotivity) open source project, under Apache LICENSE 2.0. -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongkwonjin/RVLD/HEAD/Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/run-lite.sh: -------------------------------------------------------------------------------- 1 | root=../../ 2 | data_dir=${root}data/CULane/ 3 | exp=vgg_SCNN_DULR_w9 4 | detect_dir=${root}tools/prob2lines/output/${exp}/ 5 | w_lane=30; 6 | iou=0.5; # Set iou to 0.3 or 0.5 7 | im_w=1640 8 | im_h=590 9 | frame=1 10 | list=${data_dir}list/test.txt 11 | out=./output/${exp}_iou${iou}.txt 12 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/run-lite.sh: -------------------------------------------------------------------------------- 1 | root=../../ 2 | data_dir=${root}data/CULane/ 3 | exp=vgg_SCNN_DULR_w9 4 | detect_dir=${root}tools/prob2lines/output/${exp}/ 5 | w_lane=30; 6 | iou=0.5; # Set iou to 0.3 or 0.5 7 | im_w=1640 8 | im_h=590 9 | frame=1 10 | list=${data_dir}list/test.txt 11 | out=./output/${exp}_iou${iou}.txt 12 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/rebuild_cache.dir 2 | /home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/edit_cache.dir 3 | /home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/culane_evaluator.dir 4 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/rebuild_cache.dir 2 | /home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/edit_cache.dir 3 | /home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/culane_evaluator.dir 4 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P03_video_based_datalist/code/main.py: -------------------------------------------------------------------------------- 1 | from options.config import Config 2 | from options.args import * 3 | from libs.preprocess import * 4 | 5 | def run(cfg, dict_DB): 6 | preprocess = Preprocessing(cfg, dict_DB) 7 | preprocess.run() 8 | 9 | def main(): 10 | # option 11 | cfg = Config() 12 | cfg = parse_args(cfg) 13 | 14 | # prepare 15 | dict_DB = dict() 16 | 17 | # run 18 | run(cfg, dict_DB) 19 | 20 | if __name__ == '__main__': 21 | main() 22 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P02_SVD/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--dataset_dir', default='/home/dkjin/Project/Dataset/OpenLane', help='dataset dir') 6 | args = parser.parse_args() 7 | 8 | cfg = args_to_config(cfg, args) 9 | return cfg 10 | 11 | def args_to_config(cfg, args): 12 | if args.dataset_dir is not None: 13 | cfg.dir['dataset'] = args.dataset_dir 14 | return cfg -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P00_data_processing/code/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from options.config import Config 4 | from options.args import * 5 | from libs.preprocess import * 6 | 7 | def run(cfg, dict_DB): 8 | preprocessor = Preprocessing(cfg, dict_DB) 9 | preprocessor.run() 10 | 11 | def main(): 12 | # option 13 | cfg = Config() 14 | cfg = parse_args(cfg) 15 | 16 | # prepare 17 | dict_DB = dict() 18 | 19 | # run 20 | run(cfg, dict_DB) 21 | 22 | if __name__ == '__main__': 23 | main() 24 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P01_lane_representation/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--dataset_dir', default='/home/dkjin/Project/Dataset/OpenLane', help='dataset dir') 6 | args = parser.parse_args() 7 | 8 | cfg = args_to_config(cfg, args) 9 | return cfg 10 | 11 | def args_to_config(cfg, args): 12 | if args.dataset_dir is not None: 13 | cfg.dir['dataset'] = args.dataset_dir 14 | return cfg -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P03_video_based_datalist/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--dataset_dir', default='/home/dkjin/Project/Dataset/OpenLane', help='dataset dir') 6 | args = parser.parse_args() 7 | 8 | cfg = args_to_config(cfg, args) 9 | return cfg 10 | 11 | def args_to_config(cfg, args): 12 | if args.dataset_dir is not None: 13 | cfg.dir['dataset'] = args.dataset_dir 14 | return cfg -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/3.5.1/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.15.0-129-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.15.0-129-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.15.0-129-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.15.0-129-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/3.10.2/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-5.4.0-107-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "5.4.0-107-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-5.4.0-107-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "5.4.0-107-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P03_video_based_datalist/code/main.py: -------------------------------------------------------------------------------- 1 | from options.config import Config 2 | from options.args import * 3 | from libs.preprocess import * 4 | 5 | def run_preprocessing(cfg, dict_DB): 6 | preprocess = Preprocessing(cfg, dict_DB) 7 | preprocess.run() 8 | 9 | def main(): 10 | 11 | # option 12 | cfg = Config() 13 | cfg = parse_args(cfg) 14 | 15 | # prepare 16 | dict_DB = dict() 17 | 18 | # run 19 | run_preprocessing(cfg, dict_DB) 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P02_SVD/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--dataset_dir', default='/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Dataset/VIL-100', help='dataset dir') 6 | args = parser.parse_args() 7 | 8 | cfg = args_to_config(cfg, args) 9 | return cfg 10 | 11 | def args_to_config(cfg, args): 12 | if args.dataset_dir is not None: 13 | cfg.dir['dataset'] = args.dataset_dir 14 | return cfg -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/3.5.1/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.15.0-129-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.15.0-129-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.15.0-129-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.15.0-129-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -fopenmp -std=gnu++11 6 | 7 | CXX_DEFINES = -DCPU_ONLY 8 | 9 | CXX_INCLUDES = -I/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/include -isystem /usr/local/include/opencv4 10 | 11 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/3.10.2/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-5.4.0-107-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "5.4.0-107-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-5.4.0-107-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "5.4.0-107-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -fopenmp -std=gnu++11 6 | 7 | CXX_DEFINES = -DCPU_ONLY 8 | 9 | CXX_INCLUDES = -I/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/include -isystem /home/ubuntu/anaconda3/envs/py37/include -isystem /home/ubuntu/anaconda3/envs/py37/include/opencv 10 | 11 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -fopenmp -std=gnu++11 6 | 7 | CXX_DEFINES = -DCPU_ONLY 8 | 9 | CXX_INCLUDES = -I/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/include -isystem /home/ubuntu/anaconda3/envs/py37/include -isystem /home/ubuntu/anaconda3/envs/py37/include/opencv 10 | 11 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -fopenmp -std=gnu++11 6 | 7 | CXX_DEFINES = -DCPU_ONLY 8 | 9 | CXX_INCLUDES = -I/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/include -isystem /usr/local/include/opencv4 10 | 11 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P00_data_processing/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--dataset_dir', default='/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Dataset/VIL-100', help='dataset dir') 6 | args = parser.parse_args() 7 | 8 | cfg = args_to_config(cfg, args) 9 | return cfg 10 | 11 | def args_to_config(cfg, args): 12 | if args.dataset_dir is not None: 13 | cfg.dir['dataset'] = args.dataset_dir 14 | return cfg -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P01_lane_representation/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--dataset_dir', default='/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Dataset/VIL-100', help='dataset dir') 6 | args = parser.parse_args() 7 | 8 | cfg = args_to_config(cfg, args) 9 | return cfg 10 | 11 | def args_to_config(cfg, args): 12 | if args.dataset_dir is not None: 13 | cfg.dir['dataset'] = args.dataset_dir 14 | return cfg -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P03_video_based_datalist/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--dataset_dir', default='/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Dataset/VIL-100', help='dataset dir') 6 | args = parser.parse_args() 7 | 8 | cfg = args_to_config(cfg, args) 9 | return cfg 10 | 11 | def args_to_config(cfg, args): 12 | if args.dataset_dir is not None: 13 | cfg.dir['dataset'] = args.dataset_dir 14 | return cfg -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/calTotal.m: -------------------------------------------------------------------------------- 1 | %% Calculate overall Fmeasure from each scenarios 2 | clc; clear; close all; 3 | 4 | allFile = 'output/vgg_SCNN_DULR_w9_iou0.5.txt'; 5 | 6 | all = textread(allFile,'%s'); 7 | TP = 0; 8 | FP = 0; 9 | FN = 0; 10 | 11 | for i=1:9 12 | tpline = (i-1)*14+4; 13 | tp = str2double(all(tpline)); 14 | fp = str2double(all(tpline+2)); 15 | fn = str2double(all(tpline+4)); 16 | TP = TP + tp; 17 | FP = FP + fp; 18 | FN = FN + fn; 19 | end 20 | 21 | P = TP/(TP + FP) 22 | R = TP/(TP + FN) 23 | F = 2*P*R/(P + R)*100 24 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/calTotal.m: -------------------------------------------------------------------------------- 1 | %% Calculate overall Fmeasure from each scenarios 2 | clc; clear; close all; 3 | 4 | allFile = 'output/vgg_SCNN_DULR_w9_iou0.5.txt'; 5 | 6 | all = textread(allFile,'%s'); 7 | TP = 0; 8 | FP = 0; 9 | FN = 0; 10 | 11 | for i=1:9 12 | tpline = (i-1)*14+4; 13 | tp = str2double(all(tpline)); 14 | fp = str2double(all(tpline+2)); 15 | fn = str2double(all(tpline+4)); 16 | TP = TP + tp; 17 | FP = FP + fp; 18 | FN = FN + fn; 19 | end 20 | 21 | P = TP/(TP + FP) 22 | R = TP/(TP + FN) 23 | F = 2*P*R/(P + R)*100 24 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ -rdynamic CMakeFiles/culane_evaluator.dir/src/counter.cpp.o CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o CMakeFiles/culane_evaluator.dir/src/spline.cpp.o -o culane_evaluator -Wl,-rpath,/usr/local/lib /usr/local/lib/libopencv_highgui.so.4.2.0 /usr/local/lib/libopencv_videoio.so.4.2.0 /usr/local/lib/libopencv_imgcodecs.so.4.2.0 /usr/local/lib/libopencv_imgproc.so.4.2.0 /usr/local/lib/libopencv_core.so.4.2.0 -lgomp -lpthread 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ -rdynamic CMakeFiles/culane_evaluator.dir/src/counter.cpp.o CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o CMakeFiles/culane_evaluator.dir/src/spline.cpp.o -o culane_evaluator -Wl,-rpath,/usr/local/lib /usr/local/lib/libopencv_highgui.so.4.2.0 /usr/local/lib/libopencv_videoio.so.4.2.0 /usr/local/lib/libopencv_imgcodecs.so.4.2.0 /usr/local/lib/libopencv_imgproc.so.4.2.0 /usr/local/lib/libopencv_core.so.4.2.0 -lgomp -lpthread 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/culane_evaluator.dir/src/counter.cpp.o" 3 | "CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o" 4 | "CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o" 5 | "CMakeFiles/culane_evaluator.dir/src/spline.cpp.o" 6 | "culane_evaluator.pdb" 7 | "culane_evaluator" 8 | ) 9 | 10 | # Per-language clean rules from dependency scanning. 11 | foreach(lang CXX) 12 | include(CMakeFiles/culane_evaluator.dir/cmake_clean_${lang}.cmake OPTIONAL) 13 | endforeach() 14 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/culane_evaluator.dir/src/counter.cpp.o" 3 | "CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o" 4 | "CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o" 5 | "CMakeFiles/culane_evaluator.dir/src/spline.cpp.o" 6 | "culane_evaluator.pdb" 7 | "culane_evaluator" 8 | ) 9 | 10 | # Per-language clean rules from dependency scanning. 11 | foreach(lang CXX) 12 | include(CMakeFiles/culane_evaluator.dir/cmake_clean_${lang}.cmake OPTIONAL) 13 | endforeach() 14 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/culane_evaluator.dir/src/counter.cpp.o" 3 | "CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o" 4 | "CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o" 5 | "CMakeFiles/culane_evaluator.dir/src/spline.cpp.o" 6 | "culane_evaluator.pdb" 7 | "culane_evaluator" 8 | ) 9 | 10 | # Per-language clean rules from dependency scanning. 11 | foreach(lang CXX) 12 | include(CMakeFiles/culane_evaluator.dir/cmake_clean_${lang}.cmake OPTIONAL) 13 | endforeach() 14 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/culane_evaluator.dir/src/counter.cpp.o" 3 | "CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o" 4 | "CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o" 5 | "CMakeFiles/culane_evaluator.dir/src/spline.cpp.o" 6 | "culane_evaluator.pdb" 7 | "culane_evaluator" 8 | ) 9 | 10 | # Per-language clean rules from dependency scanning. 11 | foreach(lang CXX) 12 | include(CMakeFiles/culane_evaluator.dir/cmake_clean_${lang}.cmake OPTIONAL) 13 | endforeach() 14 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P02_SVD/code/main.py: -------------------------------------------------------------------------------- 1 | from options.config import Config 2 | from options.args import * 3 | from libs.prepare import * 4 | from libs.preprocess import * 5 | 6 | def run_preprocessing(cfg, dict_DB): 7 | preprocess = Preprocessing(cfg, dict_DB) 8 | preprocess.run() 9 | 10 | def main(): 11 | 12 | # option 13 | cfg = Config() 14 | cfg = parse_args(cfg) 15 | 16 | # prepare 17 | dict_DB = dict() 18 | dict_DB = prepare_visualization(cfg, dict_DB) 19 | 20 | # run 21 | run_preprocessing(cfg, dict_DB) 22 | 23 | if __name__ == '__main__': 24 | main() 25 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P01_lane_representation/code/main.py: -------------------------------------------------------------------------------- 1 | from options.config import Config 2 | from options.args import * 3 | from libs.prepare import * 4 | from libs.preprocess import * 5 | 6 | def run_preprocessing(cfg, dict_DB): 7 | preprocess = Preprocessing(cfg, dict_DB) 8 | preprocess.run() 9 | 10 | def main(): 11 | 12 | # option 13 | cfg = Config() 14 | cfg = parse_args(cfg) 15 | 16 | # prepare 17 | dict_DB = dict() 18 | dict_DB = prepare_visualization(cfg, dict_DB) 19 | 20 | # run 21 | run_preprocessing(cfg, dict_DB) 22 | 23 | if __name__ == '__main__': 24 | main() 25 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P02_SVD/code/main.py: -------------------------------------------------------------------------------- 1 | from options.config import Config 2 | from options.args import * 3 | from libs.prepare import * 4 | from libs.preprocess import * 5 | 6 | def run(cfg, dict_DB): 7 | preprocess = Preprocessing(cfg, dict_DB) 8 | preprocess.run() 9 | 10 | def main(): 11 | # option 12 | cfg = Config() 13 | cfg = parse_args(cfg) 14 | 15 | # prepare 16 | dict_DB = dict() 17 | dict_DB = prepare_visualization(cfg, dict_DB) 18 | dict_DB = prepare_dataloader(cfg, dict_DB) 19 | 20 | # run 21 | run(cfg, dict_DB) 22 | 23 | if __name__ == '__main__': 24 | main() 25 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P01_lane_representation/code/main.py: -------------------------------------------------------------------------------- 1 | from options.config import Config 2 | from options.args import * 3 | from libs.prepare import * 4 | from libs.preprocess import * 5 | 6 | def run(cfg, dict_DB): 7 | preprocess = Preprocessing(cfg, dict_DB) 8 | preprocess.run() 9 | 10 | def main(): 11 | 12 | # option 13 | cfg = Config() 14 | cfg = parse_args(cfg) 15 | 16 | # prepare 17 | dict_DB = dict() 18 | dict_DB = prepare_visualization(cfg, dict_DB) 19 | dict_DB = prepare_dataloader(cfg, dict_DB) 20 | 21 | # run 22 | run(cfg, dict_DB) 23 | 24 | if __name__ == '__main__': 25 | main() 26 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/rebuild_cache.dir 2 | /media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/culane_evaluator.dir 3 | /media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/edit_cache.dir 4 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/rebuild_cache.dir 2 | /media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/culane_evaluator.dir 3 | /media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/edit_cache.dir 4 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ CMakeFiles/culane_evaluator.dir/src/counter.cpp.o CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o CMakeFiles/culane_evaluator.dir/src/spline.cpp.o -o culane_evaluator -rdynamic /home/ubuntu/anaconda3/envs/py37/lib/libopencv_highgui.so.3.4.2 -fopenmp /home/ubuntu/anaconda3/envs/py37/lib/libopencv_videoio.so.3.4.2 /home/ubuntu/anaconda3/envs/py37/lib/libopencv_imgcodecs.so.3.4.2 /home/ubuntu/anaconda3/envs/py37/lib/libopencv_imgproc.so.3.4.2 /home/ubuntu/anaconda3/envs/py37/lib/libopencv_core.so.3.4.2 -Wl,-rpath,/home/ubuntu/anaconda3/envs/py37/lib 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ CMakeFiles/culane_evaluator.dir/src/counter.cpp.o CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o CMakeFiles/culane_evaluator.dir/src/spline.cpp.o -o culane_evaluator -rdynamic /home/ubuntu/anaconda3/envs/py37/lib/libopencv_highgui.so.3.4.2 -fopenmp /home/ubuntu/anaconda3/envs/py37/lib/libopencv_videoio.so.3.4.2 /home/ubuntu/anaconda3/envs/py37/lib/libopencv_imgcodecs.so.3.4.2 /home/ubuntu/anaconda3/envs/py37/lib/libopencv_imgproc.so.3.4.2 /home/ubuntu/anaconda3/envs/py37/lib/libopencv_core.so.3.4.2 -Wl,-rpath,/home/ubuntu/anaconda3/envs/py37/lib 2 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/include/spline.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SPLINE_HPP 2 | #define SPLINE_HPP 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace cv; 9 | using namespace std; 10 | 11 | struct Func { 12 | double a_x; 13 | double b_x; 14 | double c_x; 15 | double d_x; 16 | double a_y; 17 | double b_y; 18 | double c_y; 19 | double d_y; 20 | double h; 21 | }; 22 | class Spline { 23 | public: 24 | vector splineInterpTimes(const vector &tmp_line, int times); 25 | vector splineInterpStep(vector tmp_line, double step); 26 | vector cal_fun(const vector &point_v); 27 | }; 28 | #endif 29 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/include/spline.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SPLINE_HPP 2 | #define SPLINE_HPP 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace cv; 9 | using namespace std; 10 | 11 | struct Func { 12 | double a_x; 13 | double b_x; 14 | double c_x; 15 | double d_x; 16 | double a_y; 17 | double b_y; 18 | double c_y; 19 | double d_y; 20 | double h; 21 | }; 22 | class Spline { 23 | public: 24 | vector splineInterpTimes(const vector &tmp_line, int times); 25 | vector splineInterpStep(vector tmp_line, double step); 26 | vector cal_fun(const vector &point_v); 27 | }; 28 | #endif 29 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/FindOpenMP/OpenMPCheckVersion.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | const char ompver_str[] = { 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'M', 5 | 'P', '-', 'd', 'a', 't', 'e', '[', 6 | ('0' + ((_OPENMP/100000)%10)), 7 | ('0' + ((_OPENMP/10000)%10)), 8 | ('0' + ((_OPENMP/1000)%10)), 9 | ('0' + ((_OPENMP/100)%10)), 10 | ('0' + ((_OPENMP/10)%10)), 11 | ('0' + ((_OPENMP/1)%10)), 12 | ']', '\0' }; 13 | int main() 14 | { 15 | puts(ompver_str); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/FindOpenMP/OpenMPCheckVersion.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | const char ompver_str[] = { 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'M', 5 | 'P', '-', 'd', 'a', 't', 'e', '[', 6 | ('0' + ((_OPENMP/100000)%10)), 7 | ('0' + ((_OPENMP/10000)%10)), 8 | ('0' + ((_OPENMP/1000)%10)), 9 | ('0' + ((_OPENMP/100)%10)), 10 | ('0' + ((_OPENMP/10)%10)), 11 | ('0' + ((_OPENMP/1)%10)), 12 | ']', '\0' }; 13 | int main() 14 | { 15 | puts(ompver_str); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P02_SVD/code/libs/prepare.py: -------------------------------------------------------------------------------- 1 | from datasets.dataset_vil100 import * 2 | from libs.visualizer import * 3 | 4 | def prepare_dataloader(cfg, dict_DB): 5 | dataset = Dataset_Train(cfg=cfg) 6 | dataloader = torch.utils.data.DataLoader(dataset=dataset, 7 | batch_size=cfg.batch_size, 8 | shuffle=False, 9 | num_workers=cfg.num_workers, 10 | pin_memory=False) 11 | 12 | dict_DB['dataloader'] = dataloader 13 | 14 | return dict_DB 15 | 16 | def prepare_visualization(cfg, dict_DB): 17 | dict_DB['visualizer'] = Visualize(cfg) 18 | return dict_DB 19 | 20 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/FindOpenMP/OpenMPCheckVersion.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | const char ompver_str[] = { 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'M', 5 | 'P', '-', 'd', 'a', 't', 'e', '[', 6 | ('0' + ((_OPENMP/100000)%10)), 7 | ('0' + ((_OPENMP/10000)%10)), 8 | ('0' + ((_OPENMP/1000)%10)), 9 | ('0' + ((_OPENMP/100)%10)), 10 | ('0' + ((_OPENMP/10)%10)), 11 | ('0' + ((_OPENMP/1)%10)), 12 | ']', '\0' }; 13 | int main() 14 | { 15 | puts(ompver_str); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/FindOpenMP/OpenMPCheckVersion.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | const char ompver_str[] = { 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'M', 5 | 'P', '-', 'd', 'a', 't', 'e', '[', 6 | ('0' + ((_OPENMP/100000)%10)), 7 | ('0' + ((_OPENMP/10000)%10)), 8 | ('0' + ((_OPENMP/1000)%10)), 9 | ('0' + ((_OPENMP/100)%10)), 10 | ('0' + ((_OPENMP/10)%10)), 11 | ('0' + ((_OPENMP/1)%10)), 12 | ']', '\0' }; 13 | int main() 14 | { 15 | puts(ompver_str); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P02_SVD/code/libs/prepare.py: -------------------------------------------------------------------------------- 1 | from datasets.dataset_openlane import * 2 | from libs.visualizer import * 3 | 4 | def prepare_dataloader(cfg, dict_DB): 5 | dataset = Dataset_OpenLane(cfg=cfg) 6 | dataloader = torch.utils.data.DataLoader(dataset=dataset, 7 | batch_size=cfg.batch_size, 8 | shuffle=False, 9 | num_workers=cfg.num_workers, 10 | pin_memory=False) 11 | 12 | dict_DB['dataloader'] = dataloader 13 | 14 | return dict_DB 15 | 16 | def prepare_visualization(cfg, dict_DB): 17 | dict_DB['visualizer'] = Visualize(cfg) 18 | return dict_DB 19 | 20 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P01_lane_representation/code/libs/prepare.py: -------------------------------------------------------------------------------- 1 | from datasets.dataset_openlane import * 2 | from libs.visualizer import * 3 | 4 | def prepare_dataloader(cfg, dict_DB): 5 | dataset = Dataset_OpenLane(cfg=cfg) 6 | dataloader = torch.utils.data.DataLoader(dataset=dataset, 7 | batch_size=cfg.batch_size, 8 | shuffle=False, 9 | num_workers=cfg.num_workers, 10 | pin_memory=False) 11 | 12 | dict_DB['dataloader'] = dataloader 13 | 14 | return dict_DB 15 | 16 | def prepare_visualization(cfg, dict_DB): 17 | dict_DB['visualizer'] = Visualize(cfg) 18 | return dict_DB 19 | 20 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P01_lane_representation/code/libs/prepare.py: -------------------------------------------------------------------------------- 1 | from datasets.dataset_vil100 import * 2 | from libs.visualizer import * 3 | 4 | def prepare_dataloader(cfg, dict_DB): 5 | if 'train' in cfg.datalist_mode: 6 | dataset = Dataset_Train(cfg=cfg) 7 | dataloader = torch.utils.data.DataLoader(dataset=dataset, 8 | batch_size=cfg.batch_size, 9 | shuffle=False, 10 | num_workers=cfg.num_workers, 11 | pin_memory=False) 12 | 13 | dict_DB['dataloader'] = dataloader 14 | 15 | return dict_DB 16 | 17 | def prepare_visualization(cfg, dict_DB): 18 | dict_DB['visualizer'] = Visualize(cfg) 19 | return dict_DB 20 | 21 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/include/lane_compare.hpp: -------------------------------------------------------------------------------- 1 | #ifndef LANE_COMPARE_HPP 2 | #define LANE_COMPARE_HPP 3 | 4 | #include "spline.hpp" 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | using namespace std; 11 | using namespace cv; 12 | 13 | class LaneCompare{ 14 | public: 15 | enum CompareMode{ 16 | IOU, 17 | Caltech 18 | }; 19 | 20 | LaneCompare(int _im_width, int _im_height, int _lane_width = 10, CompareMode _compare_mode = IOU){ 21 | im_width = _im_width; 22 | im_height = _im_height; 23 | compare_mode = _compare_mode; 24 | lane_width = _lane_width; 25 | } 26 | 27 | double get_lane_similarity(const vector &lane1, const vector &lane2); 28 | void resize_lane(vector &curr_lane, int curr_width, int curr_height); 29 | private: 30 | CompareMode compare_mode; 31 | int im_width; 32 | int im_height; 33 | int lane_width; 34 | Spline splineSolver; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/include/lane_compare.hpp: -------------------------------------------------------------------------------- 1 | #ifndef LANE_COMPARE_HPP 2 | #define LANE_COMPARE_HPP 3 | 4 | #include "spline.hpp" 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | using namespace std; 11 | using namespace cv; 12 | 13 | class LaneCompare{ 14 | public: 15 | enum CompareMode{ 16 | IOU, 17 | Caltech 18 | }; 19 | 20 | LaneCompare(int _im_width, int _im_height, int _lane_width = 10, CompareMode _compare_mode = IOU){ 21 | im_width = _im_width; 22 | im_height = _im_height; 23 | compare_mode = _compare_mode; 24 | lane_width = _lane_width; 25 | } 26 | 27 | double get_lane_similarity(const vector &lane1, const vector &lane2); 28 | void resize_lane(vector &curr_lane, int curr_width, int curr_height); 29 | private: 30 | CompareMode compare_mode; 31 | int im_width; 32 | int im_height; 33 | int lane_width; 34 | Spline splineSolver; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/getopt/getopt.h: -------------------------------------------------------------------------------- 1 | /* ***************************************************************** 2 | * 3 | * Copyright 2016 Microsoft 4 | * 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | ******************************************************************/ 19 | 20 | #ifndef GETOPT_H__ 21 | #define GETOPT_H__ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern char *optarg; 28 | extern int optind; 29 | 30 | int getopt(int argc, char *const argv[], const char *optstring); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/getopt/getopt.h: -------------------------------------------------------------------------------- 1 | /* ***************************************************************** 2 | * 3 | * Copyright 2016 Microsoft 4 | * 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | ******************************************************************/ 19 | 20 | #ifndef GETOPT_H__ 21 | #define GETOPT_H__ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern char *optarg; 28 | extern int optind; 29 | 30 | int getopt(int argc, char *const argv[], const char *optstring); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/libs/save_model.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from libs.utils import * 3 | 4 | def save_model(checkpoint, param, path): 5 | mkdir(path) 6 | torch.save({ 7 | 'epoch': checkpoint['epoch'], 8 | 'iteration': checkpoint['iteration'], 9 | 'batch_iteration': checkpoint['batch_iteration'], 10 | 'val_result': checkpoint['val_result'], 11 | 'model': checkpoint['model'].state_dict(), 12 | 'optimizer': checkpoint['optimizer'].state_dict()}, 13 | f'{path}/{param}') 14 | 15 | def save_model_max(checkpoint, path, max_val, val, logger, logfile, model_name): 16 | if max_val < val: 17 | save_model(checkpoint, model_name, path) 18 | max_val = val 19 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 20 | print(model_name) 21 | return max_val 22 | 23 | def save_model_max_upper(checkpoint, path, max_val, val, val2, thresd, logger, logfile, model_name): 24 | mkdir(path) 25 | if max_val < val and val2 > thresd: 26 | save_model(checkpoint, model_name, path) 27 | max_val = val 28 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 29 | print(model_name) 30 | return max_val 31 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/libs/save_model.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from libs.utils import * 3 | 4 | def save_model(checkpoint, param, path): 5 | mkdir(path) 6 | torch.save({ 7 | 'epoch': checkpoint['epoch'], 8 | 'iteration': checkpoint['iteration'], 9 | 'batch_iteration': checkpoint['batch_iteration'], 10 | 'val_result': checkpoint['val_result'], 11 | 'model': checkpoint['model'].state_dict(), 12 | 'optimizer': checkpoint['optimizer'].state_dict()}, 13 | f'{path}/{param}') 14 | 15 | def save_model_max(checkpoint, path, max_val, val, logger, logfile, model_name): 16 | if max_val < val: 17 | save_model(checkpoint, model_name, path) 18 | max_val = val 19 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 20 | print(model_name) 21 | return max_val 22 | 23 | def save_model_max_upper(checkpoint, path, max_val, val, val2, thresd, logger, logfile, model_name): 24 | mkdir(path) 25 | if max_val < val and val2 > thresd: 26 | save_model(checkpoint, model_name, path) 27 | max_val = val 28 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 29 | print(model_name) 30 | return max_val 31 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/getopt/getopt.c: -------------------------------------------------------------------------------- 1 | /* ***************************************************************** 2 | * 3 | * Copyright 2016 Microsoft 4 | * 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | ******************************************************************/ 19 | 20 | #include "getopt.h" 21 | #include 22 | 23 | char* optarg = NULL; 24 | int optind = 1; 25 | 26 | int getopt(int argc, char *const argv[], const char *optstring) 27 | { 28 | if ((optind >= argc) || (argv[optind][0] != '-') || (argv[optind][0] == 0)) 29 | { 30 | return -1; 31 | } 32 | 33 | int opt = argv[optind][1]; 34 | const char *p = strchr(optstring, opt); 35 | 36 | if (p == NULL) 37 | { 38 | return '?'; 39 | } 40 | if (p[1] == ':') 41 | { 42 | optind++; 43 | if (optind >= argc) 44 | { 45 | return '?'; 46 | } 47 | optarg = argv[optind]; 48 | optind++; 49 | } 50 | return opt; 51 | } 52 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/getopt/getopt.c: -------------------------------------------------------------------------------- 1 | /* ***************************************************************** 2 | * 3 | * Copyright 2016 Microsoft 4 | * 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | ******************************************************************/ 19 | 20 | #include "getopt.h" 21 | #include 22 | 23 | char* optarg = NULL; 24 | int optind = 1; 25 | 26 | int getopt(int argc, char *const argv[], const char *optstring) 27 | { 28 | if ((optind >= argc) || (argv[optind][0] != '-') || (argv[optind][0] == 0)) 29 | { 30 | return -1; 31 | } 32 | 33 | int opt = argv[optind][1]; 34 | const char *p = strchr(optstring, opt); 35 | 36 | if (p == NULL) 37 | { 38 | return '?'; 39 | } 40 | if (p[1] == ':') 41 | { 42 | optind++; 43 | if (optind >= argc) 44 | { 45 | return '?'; 46 | } 47 | optarg = argv[optind]; 48 | optind++; 49 | } 50 | return opt; 51 | } 52 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_coeff/code/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from options.config import Config 4 | from options.args import * 5 | from tools.test import * 6 | from tools.train import * 7 | from libs.prepare import * 8 | 9 | def main_eval(cfg, dict_DB): 10 | # eval option 11 | test_process = Test_Process(cfg, dict_DB) 12 | test_process.evaluation(mode='test') 13 | 14 | def main_test(cfg, dict_DB): 15 | # test option 16 | test_process = Test_Process(cfg, dict_DB) 17 | test_process.run(dict_DB['model_s'], dict_DB['model'], mode='test') 18 | 19 | def main_train(cfg, dict_DB): 20 | # train option 21 | dict_DB['test_process'] = Test_Process(cfg, dict_DB) 22 | train_process = Train_Process(cfg, dict_DB) 23 | train_process.run() 24 | 25 | def main(): 26 | # Config 27 | cfg = Config() 28 | cfg = parse_args(cfg) 29 | 30 | os.environ["CUDA_VISIBLE_DEVICES"] = cfg.gpu_id 31 | torch.backends.cudnn.deterministic = True 32 | 33 | # prepare 34 | dict_DB = dict() 35 | dict_DB = prepare_visualization(cfg, dict_DB) 36 | dict_DB = prepare_dataloader(cfg, dict_DB) 37 | dict_DB = prepare_model(cfg, dict_DB) 38 | dict_DB = prepare_post_processing(cfg, dict_DB) 39 | dict_DB = prepare_evaluation(cfg, dict_DB) 40 | dict_DB = prepare_training(cfg, dict_DB) 41 | 42 | if 'test' in cfg.run_mode: 43 | main_test(cfg, dict_DB) 44 | elif 'train' in cfg.run_mode: 45 | main_train(cfg, dict_DB) 46 | elif 'eval' in cfg.run_mode: 47 | main_eval(cfg, dict_DB) 48 | 49 | 50 | if __name__ == '__main__': 51 | main() 52 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from options.config import Config 4 | from options.args import * 5 | from tools.test import * 6 | from tools.train import * 7 | from libs.prepare import * 8 | 9 | def main_eval(cfg, dict_DB): 10 | # eval option 11 | test_process = Test_Process(cfg, dict_DB) 12 | test_process.evaluation(mode='test') 13 | 14 | def main_test(cfg, dict_DB): 15 | # test option 16 | test_process = Test_Process(cfg, dict_DB) 17 | test_process.run(dict_DB['model_s'], dict_DB['model'], mode='test') 18 | 19 | def main_train(cfg, dict_DB): 20 | # train option 21 | dict_DB['test_process'] = Test_Process(cfg, dict_DB) 22 | train_process = Train_Process(cfg, dict_DB) 23 | train_process.run() 24 | 25 | def main(): 26 | # Config 27 | cfg = Config() 28 | cfg = parse_args(cfg) 29 | 30 | os.environ["CUDA_VISIBLE_DEVICES"] = cfg.gpu_id 31 | torch.backends.cudnn.deterministic = True 32 | 33 | # prepare 34 | dict_DB = dict() 35 | dict_DB = prepare_visualization(cfg, dict_DB) 36 | dict_DB = prepare_dataloader(cfg, dict_DB) 37 | dict_DB = prepare_model(cfg, dict_DB) 38 | dict_DB = prepare_post_processing(cfg, dict_DB) 39 | dict_DB = prepare_evaluation(cfg, dict_DB) 40 | dict_DB = prepare_training(cfg, dict_DB) 41 | 42 | if 'test' in cfg.run_mode: 43 | main_test(cfg, dict_DB) 44 | elif 'train' in cfg.run_mode: 45 | main_train(cfg, dict_DB) 46 | elif 'eval' in cfg.run_mode: 47 | main_eval(cfg, dict_DB) 48 | 49 | 50 | if __name__ == '__main__': 51 | main() 52 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P00_data_processing/code/options/config.py: -------------------------------------------------------------------------------- 1 | import os 2 | import torch 3 | 4 | class Config(object): 5 | def __init__(self): 6 | # --------basics-------- # 7 | self.setting_for_system() 8 | self.setting_for_path() 9 | self.setting_for_image_param() 10 | self.setting_for_save() 11 | 12 | def setting_for_system(self): 13 | self.gpu_id = "0" 14 | self.seed = 123 15 | os.environ["CUDA_VISIBLE_DEVICES"] = self.gpu_id 16 | torch.backends.cudnn.deterministic = True 17 | 18 | def setting_for_path(self): 19 | self.pc = 'main' 20 | self.dir = dict() 21 | 22 | self.setting_for_dataset_path() # dataset path 23 | self.dir['proj'] = os.path.dirname(os.getcwd()) 24 | self.dir['out'] = f'{os.getcwd().replace("code", "output")}_{self.datalist_mode}' 25 | 26 | def setting_for_dataset_path(self): 27 | self.dataset = 'vil100' # ['vil100'] 28 | self.datalist_mode = 'train' # ['train', 'test'] 29 | 30 | # ------------------- need to modify ------------------- 31 | self.dir['dataset'] = '--dataset_dir' 32 | # ------------------------------------------------------ 33 | 34 | def setting_for_image_param(self): 35 | self.height = 384 36 | self.width = 640 37 | self.size = [self.width, self.height, self.width, self.height] 38 | self.mean = [0.485, 0.456, 0.406] 39 | self.std = [0.229, 0.224, 0.225] 40 | self.crop_size = 180 41 | 42 | def setting_for_save(self): 43 | self.save_pickle = True 44 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from options.config import Config 4 | from options.args import * 5 | from tools.test import * 6 | from tools.train import * 7 | from libs.prepare import * 8 | 9 | def main_eval(cfg, dict_DB): 10 | # eval option 11 | test_process = Test_Process(cfg, dict_DB) 12 | test_process.evaluation(mode='test') 13 | 14 | def main_test(cfg, dict_DB): 15 | # test option 16 | test_process = Test_Process(cfg, dict_DB) 17 | test_process.run(dict_DB['model_s'], dict_DB['model_c'], dict_DB['model'], mode='test') 18 | 19 | def main_train(cfg, dict_DB): 20 | # train option 21 | dict_DB['test_process'] = Test_Process(cfg, dict_DB) 22 | train_process = Train_Process(cfg, dict_DB) 23 | train_process.run() 24 | 25 | def main(): 26 | # Config 27 | cfg = Config() 28 | cfg = parse_args(cfg) 29 | 30 | os.environ["CUDA_VISIBLE_DEVICES"] = cfg.gpu_id 31 | torch.backends.cudnn.deterministic = True 32 | 33 | # prepare 34 | dict_DB = dict() 35 | dict_DB = prepare_visualization(cfg, dict_DB) 36 | dict_DB = prepare_dataloader(cfg, dict_DB) 37 | dict_DB = prepare_model(cfg, dict_DB) 38 | dict_DB = prepare_post_processing(cfg, dict_DB) 39 | dict_DB = prepare_evaluation(cfg, dict_DB) 40 | dict_DB = prepare_training(cfg, dict_DB) 41 | 42 | if 'test' in cfg.run_mode: 43 | main_test(cfg, dict_DB) 44 | elif 'train' in cfg.run_mode: 45 | main_train(cfg, dict_DB) 46 | elif 'eval' in cfg.run_mode: 47 | main_eval(cfg, dict_DB) 48 | 49 | 50 | if __name__ == '__main__': 51 | main() 52 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from options.config import Config 4 | from options.args import * 5 | from tools.test import * 6 | from tools.train import * 7 | from libs.prepare import * 8 | 9 | def main_eval(cfg, dict_DB): 10 | # eval option 11 | test_process = Test_Process(cfg, dict_DB) 12 | test_process.evaluation(mode='test') 13 | 14 | def main_test(cfg, dict_DB): 15 | # test option 16 | test_process = Test_Process(cfg, dict_DB) 17 | test_process.run(dict_DB['model_s'], dict_DB['model_c'], dict_DB['model'], mode='test') 18 | 19 | def main_train(cfg, dict_DB): 20 | # train option 21 | dict_DB['test_process'] = Test_Process(cfg, dict_DB) 22 | train_process = Train_Process(cfg, dict_DB) 23 | train_process.run() 24 | 25 | def main(): 26 | # Config 27 | cfg = Config() 28 | cfg = parse_args(cfg) 29 | 30 | os.environ["CUDA_VISIBLE_DEVICES"] = cfg.gpu_id 31 | torch.backends.cudnn.deterministic = True 32 | 33 | # prepare 34 | dict_DB = dict() 35 | dict_DB = prepare_visualization(cfg, dict_DB) 36 | dict_DB = prepare_dataloader(cfg, dict_DB) 37 | dict_DB = prepare_model(cfg, dict_DB) 38 | dict_DB = prepare_post_processing(cfg, dict_DB) 39 | dict_DB = prepare_evaluation(cfg, dict_DB) 40 | dict_DB = prepare_training(cfg, dict_DB) 41 | 42 | if 'test' in cfg.run_mode: 43 | main_test(cfg, dict_DB) 44 | elif 'train' in cfg.run_mode: 45 | main_train(cfg, dict_DB) 46 | elif 'eval' in cfg.run_mode: 47 | main_eval(cfg, dict_DB) 48 | 49 | 50 | if __name__ == '__main__': 51 | main() 52 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/libs/save_model.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from libs.utils import * 3 | 4 | def save_model(checkpoint, param, path): 5 | mkdir(path) 6 | torch.save({ 7 | 'epoch': checkpoint['epoch'], 8 | 'iteration': checkpoint['iteration'], 9 | 'batch_iteration': checkpoint['batch_iteration'], 10 | 'val_result': checkpoint['val_result'], 11 | 'model': checkpoint['model'].state_dict(), 12 | 'optimizer': checkpoint['optimizer'].state_dict()}, 13 | f'{path}/{param}') 14 | 15 | def save_model_max(checkpoint, path, max_val, val, logger, logfile, model_name): 16 | if max_val < val: 17 | save_model(checkpoint, model_name, path) 18 | max_val = val 19 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 20 | print(model_name) 21 | return max_val 22 | 23 | def save_model_min(checkpoint, path, min_val, val, logger, logfile, model_name): 24 | if min_val > val: 25 | save_model(checkpoint, model_name, path) 26 | min_val = val 27 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, min_val), logfile) 28 | print(model_name) 29 | return min_val 30 | 31 | def save_model_max_upper(checkpoint, path, max_val, val, val2, thresd, logger, logfile, model_name): 32 | mkdir(path) 33 | if max_val < val and val2 > thresd: 34 | save_model(checkpoint, model_name, path) 35 | max_val = val 36 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 37 | print(model_name) 38 | return max_val 39 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/libs/save_model.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from libs.utils import * 3 | 4 | def save_model(checkpoint, param, path): 5 | mkdir(path) 6 | torch.save({ 7 | 'epoch': checkpoint['epoch'], 8 | 'iteration': checkpoint['iteration'], 9 | 'batch_iteration': checkpoint['batch_iteration'], 10 | 'val_result': checkpoint['val_result'], 11 | 'model': checkpoint['model'].state_dict(), 12 | 'optimizer': checkpoint['optimizer'].state_dict()}, 13 | f'{path}/{param}') 14 | 15 | def save_model_max(checkpoint, path, max_val, val, logger, logfile, model_name): 16 | if max_val < val: 17 | save_model(checkpoint, model_name, path) 18 | max_val = val 19 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 20 | print(model_name) 21 | return max_val 22 | 23 | def save_model_min(checkpoint, path, min_val, val, logger, logfile, model_name): 24 | if min_val > val: 25 | save_model(checkpoint, model_name, path) 26 | min_val = val 27 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, min_val), logfile) 28 | print(model_name) 29 | return min_val 30 | 31 | def save_model_max_upper(checkpoint, path, max_val, val, val2, thresd, logger, logfile, model_name): 32 | mkdir(path) 33 | if max_val < val and val2 > thresd: 34 | save_model(checkpoint, model_name, path) 35 | max_val = val 36 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 37 | print(model_name) 38 | return max_val 39 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/libs/save_model.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from libs.utils import * 3 | 4 | def save_model(checkpoint, param, path): 5 | mkdir(path) 6 | torch.save({ 7 | 'epoch': checkpoint['epoch'], 8 | 'iteration': checkpoint['iteration'], 9 | 'batch_iteration': checkpoint['batch_iteration'], 10 | 'val_result': checkpoint['val_result'], 11 | 'model': checkpoint['model'].state_dict(), 12 | 'optimizer': checkpoint['optimizer'].state_dict()}, 13 | f'{path}/{param}') 14 | 15 | def save_model_max(checkpoint, path, max_val, val, logger, logfile, model_name): 16 | if max_val < val: 17 | save_model(checkpoint, model_name, path) 18 | max_val = val 19 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 20 | print(model_name) 21 | return max_val 22 | 23 | def save_model_min(checkpoint, path, min_val, val, logger, logfile, model_name): 24 | if min_val > val: 25 | save_model(checkpoint, model_name, path) 26 | min_val = val 27 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, min_val), logfile) 28 | print(model_name) 29 | return min_val 30 | 31 | def save_model_max_upper(checkpoint, path, max_val, val, val2, thresd, logger, logfile, model_name): 32 | mkdir(path) 33 | if max_val < val and val2 > thresd: 34 | save_model(checkpoint, model_name, path) 35 | max_val = val 36 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 37 | print(model_name) 38 | return max_val 39 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_coeff/code/libs/save_model.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from libs.utils import * 3 | 4 | def save_model(checkpoint, param, path): 5 | mkdir(path) 6 | torch.save({ 7 | 'epoch': checkpoint['epoch'], 8 | 'iteration': checkpoint['iteration'], 9 | 'batch_iteration': checkpoint['batch_iteration'], 10 | 'val_result': checkpoint['val_result'], 11 | 'model': checkpoint['model'].state_dict(), 12 | 'optimizer': checkpoint['optimizer'].state_dict()}, 13 | f'{path}/{param}') 14 | 15 | def save_model_max(checkpoint, path, max_val, val, logger, logfile, model_name): 16 | if max_val < val: 17 | save_model(checkpoint, model_name, path) 18 | max_val = val 19 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 20 | print(model_name) 21 | return max_val 22 | 23 | def save_model_min(checkpoint, path, min_val, val, logger, logfile, model_name): 24 | if min_val > val: 25 | save_model(checkpoint, model_name, path) 26 | min_val = val 27 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, min_val), logfile) 28 | print(model_name) 29 | return min_val 30 | 31 | def save_model_max_upper(checkpoint, path, max_val, val, val2, thresd, logger, logfile, model_name): 32 | mkdir(path) 33 | if max_val < val and val2 > thresd: 34 | save_model(checkpoint, model_name, path) 35 | max_val = val 36 | logger("Epoch %03d => %s : %5f\n" % (checkpoint['epoch'], model_name, max_val), logfile) 37 | print(model_name) 38 | return max_val 39 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--run_mode', type=str, default='train', help='run mode (train, test)') 6 | parser.add_argument('--pre_dir', type=str, default='--root/preprocessed/DATASET_NAME/', help='preprocessed data dir') 7 | parser.add_argument('--dataset_dir', default=None, help='dataset dir') 8 | args = parser.parse_args() 9 | 10 | cfg = args_to_config(cfg, args) 11 | return cfg 12 | 13 | # Example on my PC env 14 | # -------------------------------------------------------- 15 | def parse_args_default(cfg): 16 | 17 | root = '/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048' 18 | parser = argparse.ArgumentParser(description='Hello') 19 | parser.add_argument('--run_mode', type=str, default='train', help='run mode (train, test, test_paper)') 20 | parser.add_argument('--pre_dir', type=str, default=f'{root}/Work/Current/Lane_detection/Project_02/P07_github/preprocessed/OpenLane-V', help='preprocessed data dir') 21 | parser.add_argument('--dataset_dir', default='/home/dkjin/Project/Dataset/OpenLane', help='dataset') 22 | args = parser.parse_args() 23 | 24 | cfg = args_to_config(cfg, args) 25 | return cfg 26 | # -------------------------------------------------------- 27 | 28 | def args_to_config(cfg, args): 29 | if args.dataset_dir is not None: 30 | cfg.dir['dataset'] = args.dataset_dir 31 | if args.pre_dir is not None: 32 | cfg.dir['head_pre'] = args.pre_dir 33 | cfg.dir['pre2'] = cfg.dir['pre2'].replace('--preprocessed data path', args.pre_dir) 34 | 35 | return cfg 36 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/include/counter.hpp: -------------------------------------------------------------------------------- 1 | #ifndef COUNTER_HPP 2 | #define COUNTER_HPP 3 | 4 | #include "lane_compare.hpp" 5 | #include "hungarianGraph.hpp" 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | using namespace std; 13 | using namespace cv; 14 | 15 | // before coming to use functions of this class, the lanes should resize to im_width and im_height using resize_lane() in lane_compare.hpp 16 | class Counter 17 | { 18 | public: 19 | Counter(int _im_width, int _im_height, double _iou_threshold=0.4, int _lane_width=10):tp(0),fp(0),fn(0),iou(0){ 20 | im_width = _im_width; 21 | im_height = _im_height; 22 | sim_threshold = _iou_threshold; 23 | lane_compare = new LaneCompare(_im_width, _im_height, _lane_width, LaneCompare::IOU); 24 | }; 25 | double get_precision(void); 26 | double get_recall(void); 27 | long getTP(void); 28 | long getFP(void); 29 | long getFN(void); 30 | double getIOU(void); 31 | // double getIOU(void); 32 | void setTP(long); 33 | void setFP(long); 34 | void setFN(long); 35 | void setIOU(double); 36 | // void setIOU(double); 37 | // direct add tp, fp, tn and fn 38 | // first match with hungarian 39 | tuple, long, long, long, long, double> count_im_pair(const vector > &anno_lanes, const vector > &detect_lanes); 40 | void makeMatch(const vector > &similarity, vector &match1, vector &match2); 41 | 42 | private: 43 | double sim_threshold; 44 | int im_width; 45 | int im_height; 46 | long tp; 47 | long fp; 48 | long fn; 49 | double iou; 50 | LaneCompare *lane_compare; 51 | }; 52 | #endif 53 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/include/counter.hpp: -------------------------------------------------------------------------------- 1 | #ifndef COUNTER_HPP 2 | #define COUNTER_HPP 3 | 4 | #include "lane_compare.hpp" 5 | #include "hungarianGraph.hpp" 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | using namespace std; 13 | using namespace cv; 14 | 15 | // before coming to use functions of this class, the lanes should resize to im_width and im_height using resize_lane() in lane_compare.hpp 16 | class Counter 17 | { 18 | public: 19 | Counter(int _im_width, int _im_height, double _iou_threshold=0.4, int _lane_width=10):tp(0),fp(0),fn(0),iou(0){ 20 | im_width = _im_width; 21 | im_height = _im_height; 22 | sim_threshold = _iou_threshold; 23 | lane_compare = new LaneCompare(_im_width, _im_height, _lane_width, LaneCompare::IOU); 24 | }; 25 | double get_precision(void); 26 | double get_recall(void); 27 | long getTP(void); 28 | long getFP(void); 29 | long getFN(void); 30 | double getIOU(void); 31 | // double getIOU(void); 32 | void setTP(long); 33 | void setFP(long); 34 | void setFN(long); 35 | void setIOU(double); 36 | // void setIOU(double); 37 | // direct add tp, fp, tn and fn 38 | // first match with hungarian 39 | tuple, long, long, long, long, double> count_im_pair(const vector > &anno_lanes, const vector > &detect_lanes); 40 | void makeMatch(const vector > &similarity, vector &match1, vector &match2); 41 | 42 | private: 43 | double sim_threshold; 44 | int im_width; 45 | int im_height; 46 | long tp; 47 | long fp; 48 | long fn; 49 | double iou; 50 | LaneCompare *lane_compare; 51 | }; 52 | #endif 53 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/models/loss.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | import torch 4 | import torch.nn as nn 5 | import torch.nn.functional as F 6 | 7 | from libs.utils import * 8 | 9 | class SoftmaxFocalLoss(nn.Module): 10 | def __init__(self, gamma=2): 11 | super(SoftmaxFocalLoss, self).__init__() 12 | self.gamma = gamma 13 | self.nll1 = nn.NLLLoss(reduce=True) 14 | self.nll2 = nn.NLLLoss(reduce=False) 15 | 16 | def forward(self, logits, labels, reduce=True): 17 | scores = F.softmax(logits, dim=1) 18 | factor = torch.pow(1.-scores, self.gamma) 19 | log_score = F.log_softmax(logits, dim=1) 20 | log_score = factor * log_score 21 | 22 | if reduce == True: 23 | loss = self.nll1(log_score, labels) 24 | else: 25 | loss = self.nll2(log_score, labels) 26 | return loss 27 | 28 | class Loss_Function(nn.Module): 29 | def __init__(self, cfg): 30 | super(Loss_Function, self).__init__() 31 | self.cfg = cfg 32 | 33 | self.loss_mse = nn.MSELoss() 34 | self.loss_bce = nn.BCELoss() 35 | self.loss_nce = nn.CrossEntropyLoss() 36 | self.loss_score = nn.MSELoss() 37 | self.loss_focal = SoftmaxFocalLoss(gamma=2) 38 | 39 | self.sf = cfg.scale_factor['seg'] 40 | self.U = load_pickle(f'{self.cfg.dir["pre2"]}/U')[:, :self.cfg.top_m] 41 | self.weight = [1e0, 1e2, 1e2, 1e2, 1e3, 1e3] 42 | 43 | def forward(self, out, gt): 44 | loss_dict = dict() 45 | 46 | l_seg = self.loss_focal(out['seg_map_logit'], gt['seg_label'][self.sf[0]]) 47 | 48 | loss_dict['sum'] = l_seg 49 | loss_dict['seg'] = l_seg 50 | 51 | return loss_dict 52 | 53 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/models/loss.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | import torch 4 | import torch.nn as nn 5 | import torch.nn.functional as F 6 | 7 | from libs.utils import * 8 | 9 | class SoftmaxFocalLoss(nn.Module): 10 | def __init__(self, gamma=2): 11 | super(SoftmaxFocalLoss, self).__init__() 12 | self.gamma = gamma 13 | self.nll1 = nn.NLLLoss(reduce=True) 14 | self.nll2 = nn.NLLLoss(reduce=False) 15 | 16 | def forward(self, logits, labels, reduce=True): 17 | scores = F.softmax(logits, dim=1) 18 | factor = torch.pow(1.-scores, self.gamma) 19 | log_score = F.log_softmax(logits, dim=1) 20 | log_score = factor * log_score 21 | 22 | if reduce == True: 23 | loss = self.nll1(log_score, labels) 24 | else: 25 | loss = self.nll2(log_score, labels) 26 | return loss 27 | 28 | class Loss_Function(nn.Module): 29 | def __init__(self, cfg): 30 | super(Loss_Function, self).__init__() 31 | self.cfg = cfg 32 | 33 | self.loss_mse = nn.MSELoss() 34 | self.loss_bce = nn.BCELoss() 35 | self.loss_nce = nn.CrossEntropyLoss() 36 | self.loss_score = nn.MSELoss() 37 | self.loss_focal = SoftmaxFocalLoss(gamma=2) 38 | 39 | self.sf = cfg.scale_factor['seg'] 40 | self.U = load_pickle(f'{self.cfg.dir["pre2"]}/U')[:, :self.cfg.top_m] 41 | self.weight = [1e0, 1e2, 1e2, 1e2, 1e3, 1e3] 42 | 43 | def forward(self, out, gt): 44 | loss_dict = dict() 45 | 46 | l_seg = self.loss_focal(out['seg_map_logit'], gt['seg_label'][self.sf[0]]) 47 | 48 | loss_dict['sum'] = l_seg 49 | loss_dict['seg'] = l_seg 50 | 51 | return loss_dict 52 | 53 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from options.config import Config 4 | from options.args import * 5 | from tools.test import * 6 | from tools.train import * 7 | from libs.prepare import * 8 | 9 | def main_eval(cfg, dict_DB): 10 | # eval option 11 | test_process = Test_Process(cfg, dict_DB) 12 | test_process.evaluation(mode='test') 13 | 14 | def main_val_for_training_set(cfg, dict_DB): 15 | # test option 16 | test_process = Test_Process(cfg, dict_DB) 17 | test_process.run(dict_DB['model'], mode='val_for_training_set') 18 | 19 | def main_test(cfg, dict_DB): 20 | # test option 21 | test_process = Test_Process(cfg, dict_DB) 22 | test_process.run(dict_DB['model'], mode='test') 23 | 24 | def main_train(cfg, dict_DB): 25 | # train option 26 | dict_DB['test_process'] = Test_Process(cfg, dict_DB) 27 | train_process = Train_Process(cfg, dict_DB) 28 | train_process.run() 29 | 30 | def main(): 31 | # Config 32 | cfg = Config() 33 | cfg = parse_args(cfg) 34 | 35 | os.environ["CUDA_VISIBLE_DEVICES"] = cfg.gpu_id 36 | torch.backends.cudnn.deterministic = True 37 | 38 | # prepare 39 | dict_DB = dict() 40 | dict_DB = prepare_visualization(cfg, dict_DB) 41 | dict_DB = prepare_dataloader(cfg, dict_DB) 42 | dict_DB = prepare_model(cfg, dict_DB) 43 | dict_DB = prepare_evaluation(cfg, dict_DB) 44 | dict_DB = prepare_training(cfg, dict_DB) 45 | 46 | if 'val_for_training_set' in cfg.run_mode: 47 | main_val_for_training_set(cfg, dict_DB) 48 | elif 'test' in cfg.run_mode: 49 | main_test(cfg, dict_DB) 50 | elif 'train' in cfg.run_mode: 51 | main_train(cfg, dict_DB) 52 | elif 'eval' in cfg.run_mode: 53 | main_eval(cfg, dict_DB) 54 | 55 | 56 | if __name__ == '__main__': 57 | main() 58 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from options.config import Config 4 | from options.args import * 5 | from tools.test import * 6 | from tools.train import * 7 | from libs.prepare import * 8 | 9 | def main_eval(cfg, dict_DB): 10 | # eval option 11 | test_process = Test_Process(cfg, dict_DB) 12 | test_process.evaluation(mode='test') 13 | 14 | def main_val_for_training_set(cfg, dict_DB): 15 | # test option 16 | test_process = Test_Process(cfg, dict_DB) 17 | test_process.run(dict_DB['model'], mode='val_for_training_set') 18 | 19 | def main_test(cfg, dict_DB): 20 | # test option 21 | test_process = Test_Process(cfg, dict_DB) 22 | test_process.run(dict_DB['model'], mode='test') 23 | 24 | def main_train(cfg, dict_DB): 25 | # train option 26 | dict_DB['test_process'] = Test_Process(cfg, dict_DB) 27 | train_process = Train_Process(cfg, dict_DB) 28 | train_process.run() 29 | 30 | def main(): 31 | # Config 32 | cfg = Config() 33 | cfg = parse_args(cfg) 34 | 35 | os.environ["CUDA_VISIBLE_DEVICES"] = cfg.gpu_id 36 | torch.backends.cudnn.deterministic = True 37 | 38 | # prepare 39 | dict_DB = dict() 40 | dict_DB = prepare_visualization(cfg, dict_DB) 41 | dict_DB = prepare_dataloader(cfg, dict_DB) 42 | dict_DB = prepare_model(cfg, dict_DB) 43 | dict_DB = prepare_evaluation(cfg, dict_DB) 44 | dict_DB = prepare_training(cfg, dict_DB) 45 | 46 | if 'val_for_training_set' in cfg.run_mode: 47 | main_val_for_training_set(cfg, dict_DB) 48 | elif 'test' in cfg.run_mode: 49 | main_test(cfg, dict_DB) 50 | elif 'train' in cfg.run_mode: 51 | main_train(cfg, dict_DB) 52 | elif 'eval' in cfg.run_mode: 53 | main_eval(cfg, dict_DB) 54 | 55 | 56 | if __name__ == '__main__': 57 | main() 58 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P02_SVD/code/libs/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | try: 3 | import pickle5 as pickle 4 | except: 5 | import pickle 6 | import numpy as np 7 | import random 8 | import torch 9 | 10 | global global_seed 11 | 12 | global_seed = 123 13 | torch.manual_seed(global_seed) 14 | torch.cuda.manual_seed(global_seed) 15 | torch.cuda.manual_seed_all(global_seed) 16 | np.random.seed(global_seed) 17 | random.seed(global_seed) 18 | 19 | def _init_fn(worker_id): 20 | 21 | seed = global_seed + worker_id 22 | np.random.seed(seed) 23 | random.seed(seed) 24 | torch.manual_seed(seed) 25 | return 26 | 27 | # convertor 28 | def to_tensor(data): 29 | return torch.from_numpy(data).cuda() 30 | 31 | def to_tensor2(data): 32 | return torch.from_numpy(data) 33 | 34 | def to_np(data): 35 | return data.cpu().numpy() 36 | 37 | def to_np2(data): 38 | return data.detach().cpu().numpy() 39 | 40 | def to_3D_np(data): 41 | return np.repeat(np.expand_dims(data, 2), 3, 2) 42 | 43 | def logger(text, LOGGER_FILE): # write log 44 | with open(LOGGER_FILE, 'a') as f: 45 | f.write(text) 46 | f.close() 47 | 48 | 49 | # directory & file 50 | def mkdir(path): 51 | if os.path.exists(path) == False: 52 | os.makedirs(path) 53 | 54 | 55 | def rmfile(path): 56 | if os.path.exists(path): 57 | os.remove(path) 58 | 59 | # pickle 60 | def save_pickle(path, data): 61 | 62 | ''' 63 | :param file_path: ... 64 | :param data: 65 | :return: 66 | ''' 67 | mkdir(os.path.dirname(path)) 68 | with open(path + '.pickle', 'wb') as f: 69 | pickle.dump(data, f, protocol=pickle.HIGHEST_PROTOCOL) 70 | 71 | 72 | def load_pickle(file_path): 73 | with open(file_path + '.pickle', 'rb') as f: 74 | data = pickle.load(f) 75 | 76 | return data 77 | 78 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P02_SVD/code/libs/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | try: 3 | import pickle5 as pickle 4 | except: 5 | import pickle 6 | import numpy as np 7 | import random 8 | import torch 9 | 10 | global global_seed 11 | 12 | global_seed = 123 13 | torch.manual_seed(global_seed) 14 | torch.cuda.manual_seed(global_seed) 15 | torch.cuda.manual_seed_all(global_seed) 16 | np.random.seed(global_seed) 17 | random.seed(global_seed) 18 | 19 | def _init_fn(worker_id): 20 | 21 | seed = global_seed + worker_id 22 | np.random.seed(seed) 23 | random.seed(seed) 24 | torch.manual_seed(seed) 25 | return 26 | 27 | # convertor 28 | def to_tensor(data): 29 | return torch.from_numpy(data).cuda() 30 | 31 | def to_tensor2(data): 32 | return torch.from_numpy(data) 33 | 34 | def to_np(data): 35 | return data.cpu().numpy() 36 | 37 | def to_np2(data): 38 | return data.detach().cpu().numpy() 39 | 40 | def to_3D_np(data): 41 | return np.repeat(np.expand_dims(data, 2), 3, 2) 42 | 43 | def logger(text, LOGGER_FILE): # write log 44 | with open(LOGGER_FILE, 'a') as f: 45 | f.write(text) 46 | f.close() 47 | 48 | 49 | # directory & file 50 | def mkdir(path): 51 | if os.path.exists(path) == False: 52 | os.makedirs(path) 53 | 54 | 55 | def rmfile(path): 56 | if os.path.exists(path): 57 | os.remove(path) 58 | 59 | # pickle 60 | def save_pickle(path, data): 61 | 62 | ''' 63 | :param file_path: ... 64 | :param data: 65 | :return: 66 | ''' 67 | mkdir(os.path.dirname(path)) 68 | with open(path + '.pickle', 'wb') as f: 69 | pickle.dump(data, f, protocol=pickle.HIGHEST_PROTOCOL) 70 | 71 | 72 | def load_pickle(file_path): 73 | with open(file_path + '.pickle', 'rb') as f: 74 | data = pickle.load(f) 75 | 76 | return data 77 | 78 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P01_lane_representation/code/libs/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | try: 3 | import pickle5 as pickle 4 | except: 5 | import pickle 6 | import numpy as np 7 | import random 8 | import torch 9 | 10 | global global_seed 11 | 12 | global_seed = 123 13 | torch.manual_seed(global_seed) 14 | torch.cuda.manual_seed(global_seed) 15 | torch.cuda.manual_seed_all(global_seed) 16 | np.random.seed(global_seed) 17 | random.seed(global_seed) 18 | 19 | def _init_fn(worker_id): 20 | 21 | seed = global_seed + worker_id 22 | np.random.seed(seed) 23 | random.seed(seed) 24 | torch.manual_seed(seed) 25 | return 26 | 27 | # convertor 28 | def to_tensor(data): 29 | return torch.from_numpy(data).cuda() 30 | 31 | def to_tensor2(data): 32 | return torch.from_numpy(data) 33 | 34 | def to_np(data): 35 | return data.cpu().numpy() 36 | 37 | def to_np2(data): 38 | return data.detach().cpu().numpy() 39 | 40 | def to_3D_np(data): 41 | return np.repeat(np.expand_dims(data, 2), 3, 2) 42 | 43 | def logger(text, LOGGER_FILE): # write log 44 | with open(LOGGER_FILE, 'a') as f: 45 | f.write(text) 46 | f.close() 47 | 48 | 49 | # directory & file 50 | def mkdir(path): 51 | if os.path.exists(path) == False: 52 | os.makedirs(path) 53 | 54 | 55 | def rmfile(path): 56 | if os.path.exists(path): 57 | os.remove(path) 58 | 59 | # pickle 60 | def save_pickle(path, data): 61 | 62 | ''' 63 | :param file_path: ... 64 | :param data: 65 | :return: 66 | ''' 67 | mkdir(os.path.dirname(path)) 68 | with open(path + '.pickle', 'wb') as f: 69 | pickle.dump(data, f, protocol=pickle.HIGHEST_PROTOCOL) 70 | 71 | 72 | def load_pickle(file_path): 73 | with open(file_path + '.pickle', 'rb') as f: 74 | data = pickle.load(f) 75 | 76 | return data 77 | 78 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P03_video_based_datalist/code/libs/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | try: 3 | import pickle5 as pickle 4 | except: 5 | import pickle 6 | import numpy as np 7 | import random 8 | import torch 9 | 10 | global global_seed 11 | 12 | global_seed = 123 13 | torch.manual_seed(global_seed) 14 | torch.cuda.manual_seed(global_seed) 15 | torch.cuda.manual_seed_all(global_seed) 16 | np.random.seed(global_seed) 17 | random.seed(global_seed) 18 | 19 | def _init_fn(worker_id): 20 | 21 | seed = global_seed + worker_id 22 | np.random.seed(seed) 23 | random.seed(seed) 24 | torch.manual_seed(seed) 25 | return 26 | 27 | # convertor 28 | def to_tensor(data): 29 | return torch.from_numpy(data).cuda() 30 | 31 | def to_tensor2(data): 32 | return torch.from_numpy(data) 33 | 34 | def to_np(data): 35 | return data.cpu().numpy() 36 | 37 | def to_np2(data): 38 | return data.detach().cpu().numpy() 39 | 40 | def to_3D_np(data): 41 | return np.repeat(np.expand_dims(data, 2), 3, 2) 42 | 43 | def logger(text, LOGGER_FILE): # write log 44 | with open(LOGGER_FILE, 'a') as f: 45 | f.write(text) 46 | f.close() 47 | 48 | 49 | # directory & file 50 | def mkdir(path): 51 | if os.path.exists(path) == False: 52 | os.makedirs(path) 53 | 54 | 55 | def rmfile(path): 56 | if os.path.exists(path): 57 | os.remove(path) 58 | 59 | # pickle 60 | def save_pickle(path, data): 61 | 62 | ''' 63 | :param file_path: ... 64 | :param data: 65 | :return: 66 | ''' 67 | mkdir(os.path.dirname(path)) 68 | with open(path + '.pickle', 'wb') as f: 69 | pickle.dump(data, f, protocol=pickle.HIGHEST_PROTOCOL) 70 | 71 | 72 | def load_pickle(file_path): 73 | with open(file_path + '.pickle', 'rb') as f: 74 | data = pickle.load(f) 75 | 76 | return data 77 | 78 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P01_lane_representation/code/libs/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | try: 3 | import pickle5 as pickle 4 | except: 5 | import pickle 6 | import numpy as np 7 | import random 8 | import torch 9 | 10 | global global_seed 11 | 12 | global_seed = 123 13 | torch.manual_seed(global_seed) 14 | torch.cuda.manual_seed(global_seed) 15 | torch.cuda.manual_seed_all(global_seed) 16 | np.random.seed(global_seed) 17 | random.seed(global_seed) 18 | 19 | def _init_fn(worker_id): 20 | 21 | seed = global_seed + worker_id 22 | np.random.seed(seed) 23 | random.seed(seed) 24 | torch.manual_seed(seed) 25 | return 26 | 27 | # convertor 28 | def to_tensor(data): 29 | return torch.from_numpy(data).cuda() 30 | 31 | def to_tensor2(data): 32 | return torch.from_numpy(data) 33 | 34 | def to_np(data): 35 | return data.cpu().numpy() 36 | 37 | def to_np2(data): 38 | return data.detach().cpu().numpy() 39 | 40 | def to_3D_np(data): 41 | return np.repeat(np.expand_dims(data, 2), 3, 2) 42 | 43 | def logger(text, LOGGER_FILE): # write log 44 | with open(LOGGER_FILE, 'a') as f: 45 | f.write(text) 46 | f.close() 47 | 48 | 49 | # directory & file 50 | def mkdir(path): 51 | if os.path.exists(path) == False: 52 | os.makedirs(path) 53 | 54 | 55 | def rmfile(path): 56 | if os.path.exists(path): 57 | os.remove(path) 58 | 59 | # pickle 60 | def save_pickle(path, data): 61 | 62 | ''' 63 | :param file_path: ... 64 | :param data: 65 | :return: 66 | ''' 67 | mkdir(os.path.dirname(path)) 68 | with open(path + '.pickle', 'wb') as f: 69 | pickle.dump(data, f, protocol=pickle.HIGHEST_PROTOCOL) 70 | 71 | 72 | def load_pickle(file_path): 73 | with open(file_path + '.pickle', 'rb') as f: 74 | data = pickle.load(f) 75 | 76 | return data 77 | 78 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P03_video_based_datalist/code/libs/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | try: 3 | import pickle5 as pickle 4 | except: 5 | import pickle 6 | import numpy as np 7 | import random 8 | import torch 9 | 10 | global global_seed 11 | 12 | global_seed = 123 13 | torch.manual_seed(global_seed) 14 | torch.cuda.manual_seed(global_seed) 15 | torch.cuda.manual_seed_all(global_seed) 16 | np.random.seed(global_seed) 17 | random.seed(global_seed) 18 | 19 | def _init_fn(worker_id): 20 | 21 | seed = global_seed + worker_id 22 | np.random.seed(seed) 23 | random.seed(seed) 24 | torch.manual_seed(seed) 25 | return 26 | 27 | # convertor 28 | def to_tensor(data): 29 | return torch.from_numpy(data).cuda() 30 | 31 | def to_tensor2(data): 32 | return torch.from_numpy(data) 33 | 34 | def to_np(data): 35 | return data.cpu().numpy() 36 | 37 | def to_np2(data): 38 | return data.detach().cpu().numpy() 39 | 40 | def to_3D_np(data): 41 | return np.repeat(np.expand_dims(data, 2), 3, 2) 42 | 43 | def logger(text, LOGGER_FILE): # write log 44 | with open(LOGGER_FILE, 'a') as f: 45 | f.write(text) 46 | f.close() 47 | 48 | 49 | # directory & file 50 | def mkdir(path): 51 | if os.path.exists(path) == False: 52 | os.makedirs(path) 53 | 54 | 55 | def rmfile(path): 56 | if os.path.exists(path): 57 | os.remove(path) 58 | 59 | # pickle 60 | def save_pickle(path, data): 61 | 62 | ''' 63 | :param file_path: ... 64 | :param data: 65 | :return: 66 | ''' 67 | mkdir(os.path.dirname(path)) 68 | with open(path + '.pickle', 'wb') as f: 69 | pickle.dump(data, f, protocol=pickle.HIGHEST_PROTOCOL) 70 | 71 | 72 | def load_pickle(file_path): 73 | with open(file_path + '.pickle', 'rb') as f: 74 | data = pickle.load(f) 75 | 76 | return data 77 | 78 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P00_data_processing/code/libs/preprocess.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import ast 3 | 4 | import torch 5 | import torch.nn.functional as F 6 | 7 | from libs.utils import * 8 | 9 | class Preprocessing(object): 10 | 11 | def __init__(self, cfg, dict_DB): 12 | self.cfg = cfg 13 | 14 | def run(self): 15 | print('start') 16 | with open(f'{self.cfg.dir["dataset"]}/data/{self.cfg.datalist_mode}.txt', 'r') as f: 17 | datalist = f.read().splitlines() 18 | datalist = sorted(datalist) 19 | self.datalist = list() 20 | for i in range(len(datalist)): 21 | img_name = datalist[i].replace(" ", "") 22 | json_name = f'{img_name.replace("/JPEGImages", "")}.json' 23 | json_file_path = f'{self.cfg.dir["dataset"]}/Json{json_name}' 24 | with open(json_file_path, 'r') as j: 25 | data = json.loads(j.read()) 26 | 27 | if len(data['annotations']['lane']) == 2: 28 | a = 1 29 | img_path = f'{self.cfg.dir["dataset"]}/{img_name}' 30 | img = cv2.imread(img_path) 31 | h, w, _ = img.shape 32 | out = dict() 33 | out['height'] = h 34 | out['width'] = w 35 | out['lane'] = data['annotations']['lane'] 36 | if self.cfg.save_pickle == True: 37 | path = f'{self.cfg.dir["out"]}/pickle/{img_name.replace("/JPEGImages/", "").replace(".jpg", "")}' 38 | save_pickle(path=path, data=out) 39 | 40 | self.datalist.append(img_name.replace("/JPEGImages/", "").replace(".jpg", "")) 41 | 42 | print('i : {}, : image name : {} done'.format(i, img_name)) 43 | 44 | if self.cfg.save_pickle == True: 45 | path = f'{self.cfg.dir["out"]}/pickle/datalist' 46 | save_pickle(path, data=self.datalist) -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--run_mode', type=str, default='train', help='run mode (train, test)') 6 | parser.add_argument('--pre_dir', type=str, default='--root/preprocessed/DATASET_NAME/', help='preprocessed data dir') 7 | parser.add_argument('--dataset_dir', default=None, help='dataset dir') 8 | args = parser.parse_args() 9 | 10 | cfg = args_to_config(cfg, args) 11 | return cfg 12 | 13 | # Example on my PC env 14 | # -------------------------------------------------------- 15 | def parse_args_default(cfg): 16 | root = '/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048' 17 | parser = argparse.ArgumentParser(description='Hello') 18 | parser.add_argument('--run_mode', type=str, default='train', help='run mode (train, test, test_paper)') 19 | parser.add_argument('--pre_dir', type=str, default=f'{root}/Work/Current/Lane_detection/Project_02/P07_github/preprocessed/VIL-100', help='preprocessed data dir') 20 | parser.add_argument('--dataset_dir', default=f'{root}/Dataset/VIL-100', help='dataset') 21 | args = parser.parse_args() 22 | 23 | cfg = args_to_config(cfg, args) 24 | return cfg 25 | # -------------------------------------------------------- 26 | 27 | def args_to_config(cfg, args): 28 | if args.dataset_dir is not None: 29 | cfg.dir['dataset'] = args.dataset_dir 30 | if args.pre_dir is not None: 31 | cfg.dir['head_pre'] = args.pre_dir 32 | cfg.dir['pre0_train'] = cfg.dir['pre0_train'].replace('--preprocessed data path', args.pre_dir) 33 | cfg.dir['pre0_test'] = cfg.dir['pre0_test'].replace('--preprocessed data path', args.pre_dir) 34 | cfg.dir['pre2'] = cfg.dir['pre2'].replace('--preprocessed data path', args.pre_dir) 35 | 36 | return cfg -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--run_mode', type=str, default='train', help='run mode (train, test)') 6 | parser.add_argument('--pre_dir', type=str, default='--root/preprocessed/DATASET_NAME/', help='preprocessed data dir') 7 | parser.add_argument('--dataset_dir', default=None, help='dataset dir') 8 | args = parser.parse_args() 9 | 10 | cfg = args_to_config(cfg, args) 11 | return cfg 12 | 13 | # Example on my PC env 14 | # -------------------------------------------------------- 15 | def parse_args_default(cfg): 16 | 17 | root = '/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048' 18 | parser = argparse.ArgumentParser(description='Hello') 19 | parser.add_argument('--run_mode', type=str, default='train', help='run mode (train, test, test_paper)') 20 | parser.add_argument('--pre_dir', type=str, default=f'{root}/Work/Current/Lane_detection/Project_02/P07_github/preprocessed/VIL-100', help='preprocessed data dir') 21 | parser.add_argument('--dataset_dir', default=f'{root}/Dataset/VIL-100', help='dataset') 22 | args = parser.parse_args() 23 | 24 | cfg = args_to_config(cfg, args) 25 | return cfg 26 | # -------------------------------------------------------- 27 | 28 | def args_to_config(cfg, args): 29 | if args.dataset_dir is not None: 30 | cfg.dir['dataset'] = args.dataset_dir 31 | if args.pre_dir is not None: 32 | cfg.dir['head_pre'] = args.pre_dir 33 | cfg.dir['pre0_train'] = cfg.dir['pre0_train'].replace('--preprocessed data path', args.pre_dir) 34 | cfg.dir['pre0_test'] = cfg.dir['pre0_test'].replace('--preprocessed data path', args.pre_dir) 35 | cfg.dir['pre2'] = cfg.dir['pre2'].replace('--preprocessed data path', args.pre_dir) 36 | 37 | return cfg -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_coeff/code/options/args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def parse_args(cfg): 4 | parser = argparse.ArgumentParser(description='Hello') 5 | parser.add_argument('--run_mode', type=str, default='train', help='run mode (train, test)') 6 | parser.add_argument('--pre_dir', type=str, default='--root/preprocessed/DATASET_NAME/', help='preprocessed data dir') 7 | parser.add_argument('--dataset_dir', default=None, help='dataset dir') 8 | args = parser.parse_args() 9 | 10 | cfg = args_to_config(cfg, args) 11 | return cfg 12 | 13 | # Example on my PC env 14 | # -------------------------------------------------------- 15 | def parse_args_default(cfg): 16 | root = '/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048' 17 | parser = argparse.ArgumentParser(description='Hello') 18 | parser.add_argument('--run_mode', type=str, default='train', help='run mode (train, test, test_paper)') 19 | parser.add_argument('--pre_dir', type=str, default=f'{root}/Work/Current/Lane_detection/Project_02/P07_github/preprocessed/OpenLane-V', help='preprocessed data dir') 20 | parser.add_argument('--dataset_dir', default='/home/dkjin/Project/Dataset/OpenLane', help='dataset') 21 | args = parser.parse_args() 22 | 23 | cfg = args_to_config(cfg, args) 24 | return cfg 25 | # -------------------------------------------------------- 26 | 27 | def args_to_config(cfg, args): 28 | if args.dataset_dir is not None: 29 | cfg.dir['dataset'] = args.dataset_dir 30 | if args.pre_dir is not None: 31 | cfg.dir['head_pre'] = args.pre_dir 32 | cfg.dir['pre2'] = cfg.dir['pre2'].replace('--preprocessed data path', args.pre_dir) 33 | cfg.dir['pre3_train'] = cfg.dir['pre3_train'].replace('--preprocessed data path', args.pre_dir) 34 | cfg.dir['pre3_test'] = cfg.dir['pre3_test'].replace('--preprocessed data path', args.pre_dir) 35 | 36 | return cfg 37 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P00_data_processing/code/libs/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | try: 4 | import pickle5 as pickle 5 | except: 6 | import pickle 7 | 8 | import numpy as np 9 | import random 10 | import torch 11 | 12 | global global_seed 13 | 14 | global_seed = 123 15 | torch.manual_seed(global_seed) 16 | torch.cuda.manual_seed(global_seed) 17 | torch.cuda.manual_seed_all(global_seed) 18 | np.random.seed(global_seed) 19 | random.seed(global_seed) 20 | 21 | def _init_fn(worker_id): 22 | 23 | seed = global_seed + worker_id 24 | np.random.seed(seed) 25 | random.seed(seed) 26 | torch.manual_seed(seed) 27 | return 28 | 29 | # convertor 30 | def to_tensor(data): 31 | return torch.from_numpy(data).cuda() 32 | 33 | def to_tensor2(data): 34 | return torch.from_numpy(data) 35 | 36 | def to_np(data): 37 | return data.cpu().numpy() 38 | 39 | def to_np2(data): 40 | return data.detach().cpu().numpy() 41 | 42 | def to_3D_np(data): 43 | return np.repeat(np.expand_dims(data, 2), 3, 2) 44 | 45 | def logger(text, LOGGER_FILE): # write log 46 | with open(LOGGER_FILE, 'a') as f: 47 | f.write(text) 48 | f.close() 49 | 50 | def read_json(dirname, fname): 51 | f = open(dirname + fname) 52 | data = json.load(f) 53 | return data 54 | 55 | # directory & file 56 | def mkdir(path): 57 | if os.path.exists(path) == False: 58 | os.makedirs(path) 59 | 60 | 61 | def rmfile(path): 62 | if os.path.exists(path): 63 | os.remove(path) 64 | 65 | # pickle 66 | def save_pickle(path, data): 67 | 68 | ''' 69 | :param file_path: ... 70 | :param data: 71 | :return: 72 | ''' 73 | mkdir(os.path.dirname(path)) 74 | with open(path + '.pickle', 'wb') as f: 75 | pickle.dump(data, f, protocol=pickle.HIGHEST_PROTOCOL) 76 | 77 | 78 | def load_pickle(file_path): 79 | with open(file_path + '.pickle', 'rb') as f: 80 | data = pickle.load(f) 81 | 82 | return data 83 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/libs/video_memory.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from libs.utils import * 3 | 4 | class Video_Memory(object): 5 | def __init__(self, cfg): 6 | self.cfg = cfg 7 | 8 | def forward_for_dict_initialization(self): 9 | self.keylist = ['img_feat', 'prob_map', 'coeff_map', 'guide_cls'] 10 | self.data = dict() 11 | for key in self.keylist: 12 | self.data[key] = dict() 13 | self.memory_t = 0 14 | 15 | def forward_for_dict_memorization(self): 16 | for i in range(self.memory_t - 1, -1, -1): 17 | for key in self.keylist: 18 | self.data[key][f't-{i+1}'] = self.data[key][f't-{i}'] 19 | 20 | for key in self.keylist: 21 | self.data[key].pop('t-0') 22 | if self.memory_t >= self.cfg.num_t: 23 | self.memory_t -= 1 24 | 25 | def forward_for_dict_initialization_per_frame(self, t): 26 | for key in self.keylist: 27 | self.data[key][t] = dict() 28 | self.t = t 29 | 30 | def forward_for_dict_update_per_frame(self, model, batch_idx=None, mode=None): 31 | if mode == 'intra' and batch_idx is not None: 32 | self.data['img_feat'][self.t] = model.img_feat[batch_idx:batch_idx + 1] 33 | self.data['prob_map'][self.t] = model.prob_map[batch_idx:batch_idx + 1] 34 | self.memory_t += 1 35 | elif mode == 'intra' and batch_idx is None: 36 | self.data['img_feat'][self.t] = model.img_feat 37 | self.data['prob_map'][self.t] = model.prob_map 38 | self.memory_t += 1 39 | elif mode == 'update': 40 | self.data['img_feat'][self.t] = model.img_feat.detach() 41 | self.data['prob_map'][self.t] = model.prob_map.detach() 42 | 43 | def forward_for_dict_transfer(self, model): 44 | model.memory = dict() 45 | for key in self.keylist: 46 | model.memory[key] = self.data[key] 47 | 48 | return model 49 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/libs/video_memory.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from libs.utils import * 3 | 4 | class Video_Memory(object): 5 | def __init__(self, cfg): 6 | self.cfg = cfg 7 | 8 | def forward_for_dict_initialization(self): 9 | self.keylist = ['img_feat', 'prob_map', 'coeff_map', 'guide_cls'] 10 | self.data = dict() 11 | for key in self.keylist: 12 | self.data[key] = dict() 13 | self.memory_t = 0 14 | 15 | def forward_for_dict_memorization(self): 16 | for i in range(self.memory_t - 1, -1, -1): 17 | for key in self.keylist: 18 | self.data[key][f't-{i+1}'] = self.data[key][f't-{i}'] 19 | 20 | for key in self.keylist: 21 | self.data[key].pop('t-0') 22 | if self.memory_t >= self.cfg.num_t: 23 | self.memory_t -= 1 24 | 25 | def forward_for_dict_initialization_per_frame(self, t): 26 | for key in self.keylist: 27 | self.data[key][t] = dict() 28 | self.t = t 29 | 30 | def forward_for_dict_update_per_frame(self, model, batch_idx=None, mode=None): 31 | if mode == 'intra' and batch_idx is not None: 32 | self.data['img_feat'][self.t] = model.img_feat[batch_idx:batch_idx + 1] 33 | self.data['prob_map'][self.t] = model.prob_map[batch_idx:batch_idx + 1] 34 | self.memory_t += 1 35 | elif mode == 'intra' and batch_idx is None: 36 | self.data['img_feat'][self.t] = model.img_feat 37 | self.data['prob_map'][self.t] = model.prob_map 38 | self.memory_t += 1 39 | elif mode == 'update': 40 | self.data['img_feat'][self.t] = model.img_feat.detach() 41 | self.data['prob_map'][self.t] = model.prob_map.detach() 42 | 43 | def forward_for_dict_transfer(self, model): 44 | model.memory = dict() 45 | for key in self.keylist: 46 | model.memory[key] = self.data[key] 47 | 48 | return model 49 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/src/counter.cpp" "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o" 8 | "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/src/evaluate.cpp" "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o" 9 | "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/src/lane_compare.cpp" "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o" 10 | "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/src/spline.cpp" "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o" 11 | ) 12 | set(CMAKE_CXX_COMPILER_ID "GNU") 13 | 14 | # Preprocessor definitions for this target. 15 | set(CMAKE_TARGET_DEFINITIONS_CXX 16 | "CPU_ONLY" 17 | ) 18 | 19 | # The include file search paths: 20 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 21 | "include" 22 | "/home/ubuntu/anaconda3/envs/py37/include" 23 | "/home/ubuntu/anaconda3/envs/py37/include/opencv" 24 | ) 25 | 26 | # Targets to which this target links. 27 | set(CMAKE_TARGET_LINKED_INFO_FILES 28 | ) 29 | 30 | # Fortran module output directory. 31 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 32 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/culane_evaluator.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/src/counter.cpp" "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o" 8 | "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/src/evaluate.cpp" "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o" 9 | "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/src/lane_compare.cpp" "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o" 10 | "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/src/spline.cpp" "/home/ubuntu/Wmq/Task/LaneDetection/BaseLineNew/Ultra-Fast-Lane-Detection-master-Train/evaluation/culane/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o" 11 | ) 12 | set(CMAKE_CXX_COMPILER_ID "GNU") 13 | 14 | # Preprocessor definitions for this target. 15 | set(CMAKE_TARGET_DEFINITIONS_CXX 16 | "CPU_ONLY" 17 | ) 18 | 19 | # The include file search paths: 20 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 21 | "include" 22 | "/home/ubuntu/anaconda3/envs/py37/include" 23 | "/home/ubuntu/anaconda3/envs/py37/include/opencv" 24 | ) 25 | 26 | # Targets to which this target links. 27 | set(CMAKE_TARGET_LINKED_INFO_FILES 28 | ) 29 | 30 | # Fortran module output directory. 31 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 32 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | if(CMAKE_INSTALL_COMPONENT) 41 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 42 | else() 43 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 44 | endif() 45 | 46 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 47 | "${CMAKE_INSTALL_MANIFEST_FILES}") 48 | file(WRITE "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/${CMAKE_INSTALL_MANIFEST}" 49 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 50 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | if(CMAKE_INSTALL_COMPONENT) 41 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 42 | else() 43 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 44 | endif() 45 | 46 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 47 | "${CMAKE_INSTALL_MANIFEST_FILES}") 48 | file(WRITE "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/${CMAKE_INSTALL_MANIFEST}" 49 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 50 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/models/backbone.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torchvision 3 | import torch.nn.modules 4 | import torch.nn as nn 5 | import torchvision.models as models 6 | 7 | class resnet(nn.Module): 8 | def __init__(self, layers, pretrained=False): 9 | super(resnet,self).__init__() 10 | 11 | if layers == '18': 12 | model = torchvision.models.resnet18(pretrained=pretrained) 13 | 14 | elif layers == '34': 15 | model = torchvision.models.resnet34(pretrained=pretrained) 16 | 17 | elif layers == '50': 18 | model = torchvision.models.resnet50(pretrained=pretrained) 19 | 20 | elif layers == '101': 21 | model = torchvision.models.resnet101(pretrained=pretrained) 22 | 23 | elif layers == '152': 24 | model = torchvision.models.resnet152(pretrained=pretrained) 25 | 26 | elif layers == '50next': 27 | model = torchvision.models.resnext50_32x4d(pretrained=pretrained) 28 | 29 | elif layers == '101next': 30 | model = torchvision.models.resnext101_32x8d(pretrained=pretrained) 31 | 32 | elif layers == '50wide': 33 | model = torchvision.models.wide_resnet50_2(pretrained=pretrained) 34 | 35 | elif layers == '101wide': 36 | model = torchvision.models.wide_resnet101_2(pretrained=pretrained) 37 | 38 | else: 39 | raise NotImplementedError 40 | 41 | self.conv1 = model.conv1 42 | self.bn1 = model.bn1 43 | self.relu = model.relu 44 | self.maxpool = model.maxpool 45 | self.layer1 = model.layer1 46 | self.layer2 = model.layer2 47 | self.layer3 = model.layer3 48 | self.layer4 = model.layer4 49 | 50 | def forward(self, x): 51 | 52 | x = self.conv1(x) 53 | x = self.bn1(x) 54 | x = self.relu(x) 55 | x = self.maxpool(x) 56 | x = self.layer1(x) 57 | x2 = self.layer2(x) 58 | x3 = self.layer3(x2) 59 | x4 = self.layer4(x3) 60 | 61 | return x2, x3, x4 62 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/models/backbone.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torchvision 3 | import torch.nn.modules 4 | import torch.nn as nn 5 | import torchvision.models as models 6 | 7 | class resnet(nn.Module): 8 | def __init__(self, layers, pretrained=False): 9 | super(resnet,self).__init__() 10 | 11 | if layers == '18': 12 | model = torchvision.models.resnet18(pretrained=pretrained) 13 | 14 | elif layers == '34': 15 | model = torchvision.models.resnet34(pretrained=pretrained) 16 | 17 | elif layers == '50': 18 | model = torchvision.models.resnet50(pretrained=pretrained) 19 | 20 | elif layers == '101': 21 | model = torchvision.models.resnet101(pretrained=pretrained) 22 | 23 | elif layers == '152': 24 | model = torchvision.models.resnet152(pretrained=pretrained) 25 | 26 | elif layers == '50next': 27 | model = torchvision.models.resnext50_32x4d(pretrained=pretrained) 28 | 29 | elif layers == '101next': 30 | model = torchvision.models.resnext101_32x8d(pretrained=pretrained) 31 | 32 | elif layers == '50wide': 33 | model = torchvision.models.wide_resnet50_2(pretrained=pretrained) 34 | 35 | elif layers == '101wide': 36 | model = torchvision.models.wide_resnet101_2(pretrained=pretrained) 37 | 38 | else: 39 | raise NotImplementedError 40 | 41 | self.conv1 = model.conv1 42 | self.bn1 = model.bn1 43 | self.relu = model.relu 44 | self.maxpool = model.maxpool 45 | self.layer1 = model.layer1 46 | self.layer2 = model.layer2 47 | self.layer3 = model.layer3 48 | self.layer4 = model.layer4 49 | 50 | def forward(self, x): 51 | 52 | x = self.conv1(x) 53 | x = self.bn1(x) 54 | x = self.relu(x) 55 | x = self.maxpool(x) 56 | x = self.layer1(x) 57 | x2 = self.layer2(x) 58 | x3 = self.layer3(x2) 59 | x4 = self.layer4(x3) 60 | 61 | return x2, x3, x4 62 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/models/backbone.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torchvision 3 | import torch.nn.modules 4 | import torch.nn as nn 5 | import torchvision.models as models 6 | 7 | class resnet(nn.Module): 8 | def __init__(self, layers, pretrained=False): 9 | super(resnet,self).__init__() 10 | 11 | if layers == '18': 12 | model = torchvision.models.resnet18(pretrained=pretrained) 13 | 14 | elif layers == '34': 15 | model = torchvision.models.resnet34(pretrained=pretrained) 16 | 17 | elif layers == '50': 18 | model = torchvision.models.resnet50(pretrained=pretrained) 19 | 20 | elif layers == '101': 21 | model = torchvision.models.resnet101(pretrained=pretrained) 22 | 23 | elif layers == '152': 24 | model = torchvision.models.resnet152(pretrained=pretrained) 25 | 26 | elif layers == '50next': 27 | model = torchvision.models.resnext50_32x4d(pretrained=pretrained) 28 | 29 | elif layers == '101next': 30 | model = torchvision.models.resnext101_32x8d(pretrained=pretrained) 31 | 32 | elif layers == '50wide': 33 | model = torchvision.models.wide_resnet50_2(pretrained=pretrained) 34 | 35 | elif layers == '101wide': 36 | model = torchvision.models.wide_resnet101_2(pretrained=pretrained) 37 | 38 | else: 39 | raise NotImplementedError 40 | 41 | self.conv1 = model.conv1 42 | self.bn1 = model.bn1 43 | self.relu = model.relu 44 | self.maxpool = model.maxpool 45 | self.layer1 = model.layer1 46 | self.layer2 = model.layer2 47 | self.layer3 = model.layer3 48 | self.layer4 = model.layer4 49 | 50 | def forward(self, x): 51 | 52 | x = self.conv1(x) 53 | x = self.bn1(x) 54 | x = self.relu(x) 55 | x = self.maxpool(x) 56 | x = self.layer1(x) 57 | x2 = self.layer2(x) 58 | x3 = self.layer3(x2) 59 | x4 = self.layer4(x3) 60 | 61 | return x2, x3, x4 62 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_seg/code/models/backbone.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torchvision 3 | import torch.nn.modules 4 | import torch.nn as nn 5 | import torchvision.models as models 6 | 7 | class resnet(nn.Module): 8 | def __init__(self, layers, pretrained=False): 9 | super(resnet,self).__init__() 10 | 11 | if layers == '18': 12 | model = torchvision.models.resnet18(pretrained=pretrained) 13 | 14 | elif layers == '34': 15 | model = torchvision.models.resnet34(pretrained=pretrained) 16 | 17 | elif layers == '50': 18 | model = torchvision.models.resnet50(pretrained=pretrained) 19 | 20 | elif layers == '101': 21 | model = torchvision.models.resnet101(pretrained=pretrained) 22 | 23 | elif layers == '152': 24 | model = torchvision.models.resnet152(pretrained=pretrained) 25 | 26 | elif layers == '50next': 27 | model = torchvision.models.resnext50_32x4d(pretrained=pretrained) 28 | 29 | elif layers == '101next': 30 | model = torchvision.models.resnext101_32x8d(pretrained=pretrained) 31 | 32 | elif layers == '50wide': 33 | model = torchvision.models.wide_resnet50_2(pretrained=pretrained) 34 | 35 | elif layers == '101wide': 36 | model = torchvision.models.wide_resnet101_2(pretrained=pretrained) 37 | 38 | else: 39 | raise NotImplementedError 40 | 41 | self.conv1 = model.conv1 42 | self.bn1 = model.bn1 43 | self.relu = model.relu 44 | self.maxpool = model.maxpool 45 | self.layer1 = model.layer1 46 | self.layer2 = model.layer2 47 | self.layer3 = model.layer3 48 | self.layer4 = model.layer4 49 | 50 | def forward(self, x): 51 | 52 | x = self.conv1(x) 53 | x = self.bn1(x) 54 | x = self.relu(x) 55 | x = self.maxpool(x) 56 | x = self.layer1(x) 57 | x2 = self.layer2(x) 58 | x3 = self.layer3(x2) 59 | x4 = self.layer4(x3) 60 | 61 | return x2, x3, x4 62 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_coeff/code/models/backbone.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torchvision 3 | import torch.nn.modules 4 | import torch.nn as nn 5 | import torchvision.models as models 6 | 7 | class resnet(nn.Module): 8 | def __init__(self, layers, pretrained=False): 9 | super(resnet,self).__init__() 10 | 11 | if layers == '18': 12 | model = torchvision.models.resnet18(pretrained=pretrained) 13 | 14 | elif layers == '34': 15 | model = torchvision.models.resnet34(pretrained=pretrained) 16 | 17 | elif layers == '50': 18 | model = torchvision.models.resnet50(pretrained=pretrained) 19 | 20 | elif layers == '101': 21 | model = torchvision.models.resnet101(pretrained=pretrained) 22 | 23 | elif layers == '152': 24 | model = torchvision.models.resnet152(pretrained=pretrained) 25 | 26 | elif layers == '50next': 27 | model = torchvision.models.resnext50_32x4d(pretrained=pretrained) 28 | 29 | elif layers == '101next': 30 | model = torchvision.models.resnext101_32x8d(pretrained=pretrained) 31 | 32 | elif layers == '50wide': 33 | model = torchvision.models.wide_resnet50_2(pretrained=pretrained) 34 | 35 | elif layers == '101wide': 36 | model = torchvision.models.wide_resnet101_2(pretrained=pretrained) 37 | 38 | else: 39 | raise NotImplementedError 40 | 41 | self.conv1 = model.conv1 42 | self.bn1 = model.bn1 43 | self.relu = model.relu 44 | self.maxpool = model.maxpool 45 | self.layer1 = model.layer1 46 | self.layer2 = model.layer2 47 | self.layer3 = model.layer3 48 | self.layer4 = model.layer4 49 | 50 | def forward(self, x): 51 | 52 | x = self.conv1(x) 53 | x = self.bn1(x) 54 | x = self.relu(x) 55 | x = self.maxpool(x) 56 | x = self.layer1(x) 57 | x2 = self.layer2(x) 58 | x3 = self.layer3(x2) 59 | x4 = self.layer4(x3) 60 | 61 | return x2, x3, x4 62 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/models/backbone.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torchvision 3 | import torch.nn.modules 4 | import torch.nn as nn 5 | import torchvision.models as models 6 | 7 | class resnet(nn.Module): 8 | def __init__(self, layers, pretrained=False): 9 | super(resnet,self).__init__() 10 | 11 | if layers == '18': 12 | model = torchvision.models.resnet18(pretrained=pretrained) 13 | 14 | elif layers == '34': 15 | model = torchvision.models.resnet34(pretrained=pretrained) 16 | 17 | elif layers == '50': 18 | model = torchvision.models.resnet50(pretrained=pretrained) 19 | 20 | elif layers == '101': 21 | model = torchvision.models.resnet101(pretrained=pretrained) 22 | 23 | elif layers == '152': 24 | model = torchvision.models.resnet152(pretrained=pretrained) 25 | 26 | elif layers == '50next': 27 | model = torchvision.models.resnext50_32x4d(pretrained=pretrained) 28 | 29 | elif layers == '101next': 30 | model = torchvision.models.resnext101_32x8d(pretrained=pretrained) 31 | 32 | elif layers == '50wide': 33 | model = torchvision.models.wide_resnet50_2(pretrained=pretrained) 34 | 35 | elif layers == '101wide': 36 | model = torchvision.models.wide_resnet101_2(pretrained=pretrained) 37 | 38 | else: 39 | raise NotImplementedError 40 | 41 | self.conv1 = model.conv1 42 | self.bn1 = model.bn1 43 | self.relu = model.relu 44 | self.maxpool = model.maxpool 45 | self.layer1 = model.layer1 46 | self.layer2 = model.layer2 47 | self.layer3 = model.layer3 48 | self.layer4 = model.layer4 49 | 50 | def forward(self, x): 51 | 52 | x = self.conv1(x) 53 | x = self.bn1(x) 54 | x = self.relu(x) 55 | x = self.maxpool(x) 56 | x = self.layer1(x) 57 | x2 = self.layer2(x) 58 | x3 = self.layer3(x2) 59 | x4 = self.layer4(x3) 60 | 61 | return x2, x3, x4 62 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/run-full.sh: -------------------------------------------------------------------------------- 1 | root=../../ 2 | data_dir=${root}data/CULane/ 3 | exp=vgg_SCNN_DULR_w9 4 | detect_dir=${root}tools/prob2lines/output/${exp}/ 5 | w_lane=30; 6 | iou=0.5; # Set iou to 0.3 or 0.5 7 | im_w=1640 8 | im_h=590 9 | frame=1 10 | list0=${data_dir}list/test_split/test0_normal.txt 11 | list1=${data_dir}list/test_split/test1_crowd.txt 12 | list2=${data_dir}list/test_split/test2_hlight.txt 13 | list3=${data_dir}list/test_split/test3_shadow.txt 14 | list4=${data_dir}list/test_split/test4_noline.txt 15 | list5=${data_dir}list/test_split/test5_arrow.txt 16 | list6=${data_dir}list/test_split/test6_curve.txt 17 | list7=${data_dir}list/test_split/test7_cross.txt 18 | list8=${data_dir}list/test_split/test8_night.txt 19 | out0=./output/out0_normal.txt 20 | out1=./output/out1_crowd.txt 21 | out2=./output/out2_hlight.txt 22 | out3=./output/out3_shadow.txt 23 | out4=./output/out4_noline.txt 24 | out5=./output/out5_arrow.txt 25 | out6=./output/out6_curve.txt 26 | out7=./output/out7_cross.txt 27 | out8=./output/out8_night.txt 28 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list0 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out0 29 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list1 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out1 30 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list2 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out2 31 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list3 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out3 32 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list4 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out4 33 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list5 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out5 34 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list6 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out6 35 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list7 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out7 36 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list8 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out8 37 | cat ./output/out*.txt>./output/${exp}_iou${iou}_split.txt -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/run-full.sh: -------------------------------------------------------------------------------- 1 | root=../../ 2 | data_dir=${root}data/CULane/ 3 | exp=vgg_SCNN_DULR_w9 4 | detect_dir=${root}tools/prob2lines/output/${exp}/ 5 | w_lane=30; 6 | iou=0.5; # Set iou to 0.3 or 0.5 7 | im_w=1640 8 | im_h=590 9 | frame=1 10 | list0=${data_dir}list/test_split/test0_normal.txt 11 | list1=${data_dir}list/test_split/test1_crowd.txt 12 | list2=${data_dir}list/test_split/test2_hlight.txt 13 | list3=${data_dir}list/test_split/test3_shadow.txt 14 | list4=${data_dir}list/test_split/test4_noline.txt 15 | list5=${data_dir}list/test_split/test5_arrow.txt 16 | list6=${data_dir}list/test_split/test6_curve.txt 17 | list7=${data_dir}list/test_split/test7_cross.txt 18 | list8=${data_dir}list/test_split/test8_night.txt 19 | out0=./output/out0_normal.txt 20 | out1=./output/out1_crowd.txt 21 | out2=./output/out2_hlight.txt 22 | out3=./output/out3_shadow.txt 23 | out4=./output/out4_noline.txt 24 | out5=./output/out5_arrow.txt 25 | out6=./output/out6_curve.txt 26 | out7=./output/out7_cross.txt 27 | out8=./output/out8_night.txt 28 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list0 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out0 29 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list1 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out1 30 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list2 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out2 31 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list3 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out3 32 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list4 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out4 33 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list5 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out5 34 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list6 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out6 35 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list7 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out7 36 | ./evaluate -a $data_dir -d $detect_dir -i $data_dir -l $list8 -w $w_lane -t $iou -c $im_w -r $im_h -f $frame -o $out8 37 | cat ./output/out*.txt>./output/${exp}_iou${iou}_split.txt -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P03_video_based_datalist/code/libs/preprocess.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import math 3 | 4 | import torch 5 | import torch.nn.functional as F 6 | 7 | from libs.utils import * 8 | 9 | class Preprocessing(object): 10 | def __init__(self, cfg, dict_DB): 11 | self.cfg = cfg 12 | 13 | def run(self): 14 | print('start') 15 | 16 | datalist_org = load_pickle(f'{self.cfg.dir["pre0"]}/datalist') 17 | if self.cfg.datalist_mode == 'train': 18 | datalist = load_pickle(f'{self.cfg.dir["pre2"]}/datalist') 19 | else: 20 | datalist = datalist_org 21 | 22 | datalist_ex = sorted(list(set(datalist_org) - set(datalist))) 23 | print(f'The number of excluded data : {len(datalist_ex)}') 24 | 25 | datalist_out = dict() 26 | for i in range(len(datalist)): 27 | name = datalist[i] 28 | dirname = os.path.dirname(name) 29 | filename = os.path.basename(name) 30 | 31 | datalist_out[name] = list() 32 | datalist_out[name].append(name) 33 | update = filename 34 | for t in range(self.cfg.clip_length * 3): 35 | prev_filename = str(int(update) - 3).zfill(5) 36 | prev_name = f'{dirname}/{prev_filename}' 37 | update = prev_filename 38 | if '-' in prev_filename: 39 | continue 40 | if prev_name not in datalist: 41 | continue 42 | if len(datalist_out[name]) == self.cfg.clip_length + 1: 43 | break 44 | datalist_out[name].append(prev_name) 45 | if len(datalist_out[name]) < self.cfg.num_t + 1 and self.cfg.datalist_mode == 'train': 46 | datalist_out.pop(name) 47 | print(f'{i} ==> {name} done') 48 | 49 | print(f'The number of datalist_org: {len(datalist_org)}') 50 | print(f'The number of datalist_pre2: {len(datalist)}') 51 | print(f'The number of datalist_video: {len(datalist_out)}') 52 | 53 | if self.cfg.save_pickle == True: 54 | save_pickle(f'{self.cfg.dir["out"]}/pickle/datalist_{self.cfg.clip_length}', data=datalist_out) -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/src/lane_compare.cpp: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | > File Name: lane_compare.cpp 3 | > Author: Xingang Pan, Jun Li 4 | > Mail: px117@ie.cuhk.edu.hk 5 | > Created Time: Fri Jul 15 10:26:32 2016 6 | ************************************************************************/ 7 | 8 | #include "lane_compare.hpp" 9 | 10 | double LaneCompare::get_lane_similarity(const vector &lane1, const vector &lane2) 11 | { 12 | if(lane1.size()<2 || lane2.size()<2) 13 | { 14 | 15 | cerr<<"ok lane size must be greater or equal to 2"< p_interp1; 22 | vector p_interp2; 23 | if(lane1.size() == 2) 24 | { 25 | p_interp1 = lane1; 26 | } 27 | else 28 | { 29 | p_interp1 = splineSolver.splineInterpTimes(lane1, 50); 30 | } 31 | 32 | if(lane2.size() == 2) 33 | { 34 | p_interp2 = lane2; 35 | } 36 | else 37 | { 38 | p_interp2 = splineSolver.splineInterpTimes(lane2, 50); 39 | } 40 | 41 | Scalar color_white = Scalar(1); 42 | for(int n=0; n &curr_lane, int curr_width, int curr_height) 62 | { 63 | if(curr_width == im_width && curr_height == im_height) 64 | { 65 | return; 66 | } 67 | double x_scale = im_width/(double)curr_width; 68 | double y_scale = im_height/(double)curr_height; 69 | for(int n=0; n File Name: lane_compare.cpp 3 | > Author: Xingang Pan, Jun Li 4 | > Mail: px117@ie.cuhk.edu.hk 5 | > Created Time: Fri Jul 15 10:26:32 2016 6 | ************************************************************************/ 7 | 8 | #include "lane_compare.hpp" 9 | 10 | double LaneCompare::get_lane_similarity(const vector &lane1, const vector &lane2) 11 | { 12 | if(lane1.size()<2 || lane2.size()<2) 13 | { 14 | 15 | cerr<<"ok lane size must be greater or equal to 2"< p_interp1; 22 | vector p_interp2; 23 | if(lane1.size() == 2) 24 | { 25 | p_interp1 = lane1; 26 | } 27 | else 28 | { 29 | p_interp1 = splineSolver.splineInterpTimes(lane1, 50); 30 | } 31 | 32 | if(lane2.size() == 2) 33 | { 34 | p_interp2 = lane2; 35 | } 36 | else 37 | { 38 | p_interp2 = splineSolver.splineInterpTimes(lane2, 50); 39 | } 40 | 41 | Scalar color_white = Scalar(1); 42 | for(int n=0; n &curr_lane, int curr_width, int curr_height) 62 | { 63 | if(curr_width == im_width && curr_height == im_height) 64 | { 65 | return; 66 | } 67 | double x_scale = im_width/(double)curr_width; 68 | double y_scale = im_height/(double)curr_height; 69 | for(int n=0; n self.cfg.prob_thresd).type(torch.long)[:, 0] 59 | self.seg_map_gt = batch['seg_label'][self.sf[0]] -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/3.5.1/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "/usr/bin/cc") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "GNU") 4 | set(CMAKE_C_COMPILER_VERSION "5.4.0") 5 | set(CMAKE_C_COMPILER_WRAPPER "") 6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 7 | set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") 8 | set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") 9 | set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") 10 | set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") 11 | 12 | set(CMAKE_C_PLATFORM_ID "Linux") 13 | set(CMAKE_C_SIMULATE_ID "") 14 | set(CMAKE_C_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "/usr/bin/ar") 17 | set(CMAKE_RANLIB "/usr/bin/ranlib") 18 | set(CMAKE_LINKER "/usr/bin/ld") 19 | set(CMAKE_COMPILER_IS_GNUCC 1) 20 | set(CMAKE_C_COMPILER_LOADED 1) 21 | set(CMAKE_C_COMPILER_WORKS TRUE) 22 | set(CMAKE_C_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_C_COMPILER_ID_RUN 1) 36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 38 | set(CMAKE_C_LINKER_PREFERENCE 10) 39 | 40 | # Save compiler ABI information. 41 | set(CMAKE_C_SIZEOF_DATA_PTR "8") 42 | set(CMAKE_C_COMPILER_ABI "ELF") 43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 44 | 45 | if(CMAKE_C_SIZEOF_DATA_PTR) 46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 47 | endif() 48 | 49 | if(CMAKE_C_COMPILER_ABI) 50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 51 | endif() 52 | 53 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 54 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 55 | endif() 56 | 57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 60 | endif() 61 | 62 | 63 | 64 | 65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c") 66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 68 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/3.5.1/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "/usr/bin/cc") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "GNU") 4 | set(CMAKE_C_COMPILER_VERSION "5.4.0") 5 | set(CMAKE_C_COMPILER_WRAPPER "") 6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 7 | set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") 8 | set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") 9 | set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") 10 | set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") 11 | 12 | set(CMAKE_C_PLATFORM_ID "Linux") 13 | set(CMAKE_C_SIMULATE_ID "") 14 | set(CMAKE_C_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "/usr/bin/ar") 17 | set(CMAKE_RANLIB "/usr/bin/ranlib") 18 | set(CMAKE_LINKER "/usr/bin/ld") 19 | set(CMAKE_COMPILER_IS_GNUCC 1) 20 | set(CMAKE_C_COMPILER_LOADED 1) 21 | set(CMAKE_C_COMPILER_WORKS TRUE) 22 | set(CMAKE_C_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_C_COMPILER_ID_RUN 1) 36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 38 | set(CMAKE_C_LINKER_PREFERENCE 10) 39 | 40 | # Save compiler ABI information. 41 | set(CMAKE_C_SIZEOF_DATA_PTR "8") 42 | set(CMAKE_C_COMPILER_ABI "ELF") 43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 44 | 45 | if(CMAKE_C_SIZEOF_DATA_PTR) 46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 47 | endif() 48 | 49 | if(CMAKE_C_COMPILER_ABI) 50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 51 | endif() 52 | 53 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 54 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 55 | endif() 56 | 57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 60 | endif() 61 | 62 | 63 | 64 | 65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c") 66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 68 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P02_SVD/code/datasets/dataset_openlane.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import torchvision.transforms as transforms 3 | 4 | from torch.utils.data import Dataset 5 | from PIL import Image 6 | from libs.utils import * 7 | 8 | class Dataset_OpenLane(Dataset): 9 | def __init__(self, cfg): 10 | self.cfg = cfg 11 | self.datalist = load_pickle(f'{cfg.dir["pre0"]}/datalist') 12 | # image transform 13 | self.transform = transforms.Compose([transforms.Resize((cfg.height, cfg.width), interpolation=2), transforms.ToTensor()]) 14 | self.normalize = transforms.Normalize(mean=cfg.mean, std=cfg.std) 15 | 16 | def get_image(self, idx, flip=0): 17 | img = Image.open(f'{self.cfg.dir["dataset"]}/images/{self.cfg.datalist_mode}/{self.datalist[idx]}.jpg').convert('RGB') 18 | self.org_width, self.org_height = img.size 19 | if flip == 1: 20 | img = img.transpose(Image.FLIP_LEFT_RIGHT) 21 | img = img.crop((0, self.cfg.crop_size, int(img.size[0]), int(img.size[1]))) 22 | img = self.transform(img) 23 | 24 | return {'img': self.normalize(img), 25 | 'img_rgb': img, 26 | 'org_h': self.org_height, 'org_w': self.org_width} 27 | 28 | def get_label(self, idx, flip=0): 29 | data = load_pickle(f'{self.cfg.dir["pre0"]}/{self.datalist[idx]}') 30 | seg_label = np.zeros((self.cfg.height, self.cfg.width, 3), dtype=np.uint8) 31 | seg_label = np.ascontiguousarray(seg_label) 32 | 33 | for i in range(len(data['lane'])): 34 | pts_org = np.float32(data['lane'][i]) 35 | pts = np.copy(pts_org) 36 | pts[:, 0] = pts_org[:, 0] / (self.org_width - 1) * (self.cfg.width - 1) 37 | pts[:, 1] = (pts_org[:, 1] - self.cfg.crop_size) / (self.org_height - self.cfg.crop_size - 1) * (self.cfg.height - 1) 38 | pts = np.int32(pts) 39 | seg_label = cv2.polylines(seg_label, [pts], False, (255, 255, 255), 1, 4) 40 | 41 | return {'lane_pts': data['lane'], 'label': seg_label} 42 | 43 | def __getitem__(self, idx): 44 | out = dict() 45 | out['img_name'] = self.datalist[idx] 46 | out.update(self.get_image(idx)) 47 | out.update(self.get_label(idx)) 48 | return out 49 | 50 | def __len__(self): 51 | return len(self.datalist) -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P01_lane_representation/code/datasets/dataset_openlane.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import torchvision.transforms as transforms 3 | 4 | from torch.utils.data import Dataset 5 | from PIL import Image 6 | from libs.utils import * 7 | 8 | class Dataset_OpenLane(Dataset): 9 | def __init__(self, cfg): 10 | self.cfg = cfg 11 | self.datalist = load_pickle(f'{cfg.dir["pre0"]}/datalist') 12 | # image transform 13 | self.transform = transforms.Compose([transforms.Resize((cfg.height, cfg.width), interpolation=2), transforms.ToTensor()]) 14 | self.normalize = transforms.Normalize(mean=cfg.mean, std=cfg.std) 15 | 16 | def get_image(self, idx, flip=0): 17 | img = Image.open(f'{self.cfg.dir["dataset"]}/images/{self.cfg.datalist_mode}/{self.datalist[idx]}.jpg').convert('RGB') 18 | self.org_width, self.org_height = img.size 19 | if flip == 1: 20 | img = img.transpose(Image.FLIP_LEFT_RIGHT) 21 | img = img.crop((0, self.cfg.crop_size, int(img.size[0]), int(img.size[1]))) 22 | img = self.transform(img) 23 | 24 | return {'img': self.normalize(img), 25 | 'img_rgb': img, 26 | 'org_h': self.org_height, 'org_w': self.org_width} 27 | 28 | def get_label(self, idx, flip=0): 29 | data = load_pickle(f'{self.cfg.dir["pre0"]}/{self.datalist[idx]}') 30 | seg_label = np.zeros((self.cfg.height, self.cfg.width, 3), dtype=np.uint8) 31 | seg_label = np.ascontiguousarray(seg_label) 32 | 33 | for i in range(len(data['lane'])): 34 | pts_org = np.float32(data['lane'][i]) 35 | pts = np.copy(pts_org) 36 | pts[:, 0] = pts_org[:, 0] / (self.org_width - 1) * (self.cfg.width - 1) 37 | pts[:, 1] = (pts_org[:, 1] - self.cfg.crop_size) / (self.org_height - self.cfg.crop_size - 1) * (self.cfg.height - 1) 38 | pts = np.int32(pts) 39 | seg_label = cv2.polylines(seg_label, [pts], False, (255, 255, 255), 1, 4) 40 | 41 | return {'lane_pts': data['lane'], 'label': seg_label} 42 | 43 | def __getitem__(self, idx): 44 | out = dict() 45 | out['img_name'] = self.datalist[idx] 46 | out.update(self.get_image(idx)) 47 | out.update(self.get_label(idx)) 48 | return out 49 | 50 | def __len__(self): 51 | return len(self.datalist) -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Thanks for the contribution of zchrissirhcz imzhuo@foxmail.com 2 | cmake_minimum_required(VERSION 3.1) 3 | 4 | project(culane_evaluator) 5 | 6 | set(CMAKE_CXX_STANDARD 11) 7 | 8 | add_definitions( 9 | -DCPU_ONLY 10 | ) 11 | 12 | set(SRC_LST 13 | ${CMAKE_SOURCE_DIR}/src/counter.cpp 14 | ${CMAKE_SOURCE_DIR}/src/evaluate.cpp 15 | ${CMAKE_SOURCE_DIR}/src/lane_compare.cpp 16 | ${CMAKE_SOURCE_DIR}/src/spline.cpp 17 | ) 18 | 19 | set(HDR_LST 20 | ${CMAKE_SOURCE_DIR}/include/counter.hpp 21 | ${CMAKE_SOURCE_DIR}/include/hungarianGraph.hpp 22 | ${CMAKE_SOURCE_DIR}/include/lane_compare.hpp 23 | ${CMAKE_SOURCE_DIR}/include/spline.hpp 24 | ) 25 | 26 | if (CMAKE_SYSTEM_NAME MATCHES "Windows") 27 | list(APPEND SRC_LST ${CMAKE_SOURCE_DIR}/getopt/getopt.c) 28 | list(APPEND HDR_LST ${CMAKE_SOURCE_DIR}/getopt/getopt.h) 29 | endif() 30 | 31 | add_executable(${PROJECT_NAME} 32 | ${SRC_LST} 33 | ${HDR_LST} 34 | ) 35 | 36 | set(dep_libs "") 37 | 38 | #--- OpenCV 39 | # You may switch different version of OpenCV like this: 40 | # set(OpenCV_DIR "/usr/local/opencv-4.3.0" CACHE PATH "") 41 | find_package(OpenCV REQUIRED 42 | COMPONENTS core highgui imgproc imgcodecs 43 | ) 44 | if(NOT OpenCV_FOUND) # if not OpenCV 4.x/3.x, then imgcodecs are not found 45 | find_package(OpenCV REQUIRED COMPONENTS core highgui imgproc) 46 | endif() 47 | 48 | list(APPEND dep_libs 49 | PUBLIC ${OpenCV_LIBS} 50 | ) 51 | 52 | #--- OpenMP 53 | find_package(OpenMP) 54 | if(NOT TARGET OpenMP::OpenMP_CXX AND (OpenMP_CXX_FOUND OR OPENMP_FOUND)) 55 | target_compile_options(${PROJECT_NAME} PRIVATE ${OpenMP_CXX_FLAGS}) 56 | endif() 57 | 58 | if(OpenMP_CXX_FOUND OR OPENMP_FOUND) 59 | message(STATUS "Building with OpenMP") 60 | if(OpenMP_CXX_FOUND) 61 | list(APPEND dep_libs PUBLIC OpenMP::OpenMP_CXX) 62 | else() 63 | list(APPEND dep_libs PRIVATE "${OpenMP_CXX_FLAGS}") 64 | endif() 65 | endif() 66 | 67 | set(dep_incs ${CMAKE_SOURCE_DIR}/include) 68 | if (CMAKE_SYSTEM_NAME MATCHES "Windows") 69 | list(APPEND dep_incs "${CMAKE_SOURCE_DIR}/getopt") 70 | endif() 71 | 72 | # --- target config with include dirs / libs 73 | target_link_libraries(${PROJECT_NAME} 74 | ${dep_libs} 75 | ) 76 | 77 | target_include_directories(${PROJECT_NAME} 78 | PUBLIC ${dep_incs} 79 | ) 80 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Thanks for the contribution of zchrissirhcz imzhuo@foxmail.com 2 | cmake_minimum_required(VERSION 3.1) 3 | 4 | project(culane_evaluator) 5 | 6 | set(CMAKE_CXX_STANDARD 11) 7 | 8 | add_definitions( 9 | -DCPU_ONLY 10 | ) 11 | 12 | set(SRC_LST 13 | ${CMAKE_SOURCE_DIR}/src/counter.cpp 14 | ${CMAKE_SOURCE_DIR}/src/evaluate.cpp 15 | ${CMAKE_SOURCE_DIR}/src/lane_compare.cpp 16 | ${CMAKE_SOURCE_DIR}/src/spline.cpp 17 | ) 18 | 19 | set(HDR_LST 20 | ${CMAKE_SOURCE_DIR}/include/counter.hpp 21 | ${CMAKE_SOURCE_DIR}/include/hungarianGraph.hpp 22 | ${CMAKE_SOURCE_DIR}/include/lane_compare.hpp 23 | ${CMAKE_SOURCE_DIR}/include/spline.hpp 24 | ) 25 | 26 | if (CMAKE_SYSTEM_NAME MATCHES "Windows") 27 | list(APPEND SRC_LST ${CMAKE_SOURCE_DIR}/getopt/getopt.c) 28 | list(APPEND HDR_LST ${CMAKE_SOURCE_DIR}/getopt/getopt.h) 29 | endif() 30 | 31 | add_executable(${PROJECT_NAME} 32 | ${SRC_LST} 33 | ${HDR_LST} 34 | ) 35 | 36 | set(dep_libs "") 37 | 38 | #--- OpenCV 39 | # You may switch different version of OpenCV like this: 40 | # set(OpenCV_DIR "/usr/local/opencv-4.3.0" CACHE PATH "") 41 | find_package(OpenCV REQUIRED 42 | COMPONENTS core highgui imgproc imgcodecs 43 | ) 44 | if(NOT OpenCV_FOUND) # if not OpenCV 4.x/3.x, then imgcodecs are not found 45 | find_package(OpenCV REQUIRED COMPONENTS core highgui imgproc) 46 | endif() 47 | 48 | list(APPEND dep_libs 49 | PUBLIC ${OpenCV_LIBS} 50 | ) 51 | 52 | #--- OpenMP 53 | find_package(OpenMP) 54 | if(NOT TARGET OpenMP::OpenMP_CXX AND (OpenMP_CXX_FOUND OR OPENMP_FOUND)) 55 | target_compile_options(${PROJECT_NAME} PRIVATE ${OpenMP_CXX_FLAGS}) 56 | endif() 57 | 58 | if(OpenMP_CXX_FOUND OR OPENMP_FOUND) 59 | message(STATUS "Building with OpenMP") 60 | if(OpenMP_CXX_FOUND) 61 | list(APPEND dep_libs PUBLIC OpenMP::OpenMP_CXX) 62 | else() 63 | list(APPEND dep_libs PRIVATE "${OpenMP_CXX_FLAGS}") 64 | endif() 65 | endif() 66 | 67 | set(dep_incs ${CMAKE_SOURCE_DIR}/include) 68 | if (CMAKE_SYSTEM_NAME MATCHES "Windows") 69 | list(APPEND dep_incs "${CMAKE_SOURCE_DIR}/getopt") 70 | endif() 71 | 72 | # --- target config with include dirs / libs 73 | target_link_libraries(${PROJECT_NAME} 74 | ${dep_libs} 75 | ) 76 | 77 | target_include_directories(${PROJECT_NAME} 78 | PUBLIC ${dep_incs} 79 | ) 80 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/PLD/code/evaluation/evaluate_flow.py: -------------------------------------------------------------------------------- 1 | import os 2 | import cv2 3 | import torch 4 | import math 5 | 6 | import numpy as np 7 | 8 | from libs.utils import * 9 | 10 | class Evaluation_Flow(object): 11 | def __init__(self, cfg): 12 | self.cfg = cfg 13 | self.sf = cfg.scale_factor['seg'] 14 | 15 | # def measure_IoU(self, X1, X2): 16 | # ep = 1e-7 17 | # X = X1 + X2 18 | # X_uni = torch.sum(X != 0, dim=(1, 2)).type(torch.float32) 19 | # X_inter = torch.sum(X == 2, dim=(1, 2)).type(torch.float32) 20 | # iou = X_inter / (X_uni + ep) 21 | # return iou 22 | 23 | def run_for_fscore(self): 24 | table = (self.b_map + 1) * (self.seg_map_gt + 2) 25 | self.results['tp'] += list(to_np(torch.sum(table == 6, dim=(1, 2)))) 26 | self.results['tn'] += list(to_np(torch.sum(table == 2, dim=(1, 2)))) 27 | self.results['fp'] += list(to_np(torch.sum(table == 4, dim=(1, 2)))) 28 | self.results['fn'] += list(to_np(torch.sum(table == 3, dim=(1, 2)))) 29 | 30 | def measure(self): 31 | ep = 1e-7 32 | results = load_pickle(f'{self.cfg.dir["out"]}/{self.mode}/pickle/eval_seg_results') 33 | 34 | tp = np.sum(np.float32(results['tp'])) 35 | fp = np.sum(np.float32(results['fp'])) 36 | fn = np.sum(np.float32(results['fn'])) 37 | precision = tp / (tp + fp + ep) 38 | recall = tp / (tp + fn + ep) 39 | fscore = 2 * precision * recall / (precision + recall + ep) 40 | 41 | print(f'\nprecision {precision}, recall {recall}, fscore {fscore}\n') 42 | return {'seg_precision': precision, 'seg_recall': recall, 'seg_fscore': fscore} 43 | 44 | def init(self): 45 | self.results = dict() 46 | self.results['tp'] = list() 47 | self.results['tn'] = list() 48 | self.results['fp'] = list() 49 | self.results['fn'] = list() 50 | self.results['precision'] = 0 51 | self.results['recall'] = 0 52 | self.results['fscore'] = 0 53 | 54 | def update(self, batch, out, mode): 55 | self.mode = mode 56 | try: 57 | self.seg_map = out['seg_map'] 58 | except: 59 | self.seg_map = out['seg_map_init'] 60 | self.b_map = (self.seg_map > self.cfg.prob_thresd).type(torch.long)[:, 0] 61 | self.seg_map_gt = batch['seg_label'][self.sf[0]] -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/evaluate_flow.py: -------------------------------------------------------------------------------- 1 | import os 2 | import cv2 3 | import torch 4 | import math 5 | 6 | import numpy as np 7 | 8 | from libs.utils import * 9 | 10 | class Evaluation_Flow(object): 11 | def __init__(self, cfg): 12 | self.cfg = cfg 13 | self.sf = cfg.scale_factor['seg'] 14 | 15 | # def measure_IoU(self, X1, X2): 16 | # ep = 1e-7 17 | # X = X1 + X2 18 | # X_uni = torch.sum(X != 0, dim=(1, 2)).type(torch.float32) 19 | # X_inter = torch.sum(X == 2, dim=(1, 2)).type(torch.float32) 20 | # iou = X_inter / (X_uni + ep) 21 | # return iou 22 | 23 | def run_for_fscore(self): 24 | table = (self.b_map + 1) * (self.seg_map_gt + 2) 25 | self.results['tp'] += list(to_np(torch.sum(table == 6, dim=(1, 2)))) 26 | self.results['tn'] += list(to_np(torch.sum(table == 2, dim=(1, 2)))) 27 | self.results['fp'] += list(to_np(torch.sum(table == 4, dim=(1, 2)))) 28 | self.results['fn'] += list(to_np(torch.sum(table == 3, dim=(1, 2)))) 29 | 30 | def measure(self): 31 | ep = 1e-7 32 | results = load_pickle(f'{self.cfg.dir["out"]}/{self.mode}/pickle/eval_seg_results') 33 | 34 | tp = np.sum(np.float32(results['tp'])) 35 | fp = np.sum(np.float32(results['fp'])) 36 | fn = np.sum(np.float32(results['fn'])) 37 | precision = tp / (tp + fp + ep) 38 | recall = tp / (tp + fn + ep) 39 | fscore = 2 * precision * recall / (precision + recall + ep) 40 | 41 | print(f'\nprecision {precision}, recall {recall}, fscore {fscore}\n') 42 | return {'seg_precision': precision, 'seg_recall': recall, 'seg_fscore': fscore} 43 | 44 | def init(self): 45 | self.results = dict() 46 | self.results['tp'] = list() 47 | self.results['tn'] = list() 48 | self.results['fp'] = list() 49 | self.results['fn'] = list() 50 | self.results['precision'] = 0 51 | self.results['recall'] = 0 52 | self.results['fscore'] = 0 53 | 54 | def update(self, batch, out, mode): 55 | self.mode = mode 56 | try: 57 | self.seg_map = out['seg_map'] 58 | except: 59 | self.seg_map = out['seg_map_init'] 60 | self.b_map = (self.seg_map > self.cfg.prob_thresd).type(torch.long)[:, 0] 61 | self.seg_map_gt = batch['seg_label'][self.sf[0]] -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P02_SVD/code/datasets/dataset_vil100.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | 3 | import torchvision.transforms as transforms 4 | from torch.utils.data import Dataset 5 | from PIL import Image 6 | 7 | from libs.utils import * 8 | 9 | class Dataset_Train(Dataset): 10 | def __init__(self, cfg): 11 | self.cfg = cfg 12 | self.datalist = load_pickle(f'{cfg.dir["pre1"]}/datalist') 13 | self.transform = transforms.Compose([transforms.Resize((cfg.height + cfg.crop_size, cfg.width), interpolation=2), transforms.ToTensor()]) 14 | self.normalize = transforms.Normalize(mean=cfg.mean, std=cfg.std) 15 | 16 | def get_image(self, idx, flip=0): 17 | img = Image.open(f'{self.cfg.dir["dataset"]}/JPEGImages/{self.datalist[idx]}.jpg').convert('RGB') 18 | self.org_width, self.org_height = img.size 19 | if flip == 1: 20 | img = img.transpose(Image.FLIP_LEFT_RIGHT) 21 | img = self.transform(img) 22 | img = img[:, self.cfg.crop_size:, :] 23 | 24 | return {'img': self.normalize(img), 25 | 'img_rgb': img, 26 | 'org_h': self.org_height, 'org_w': self.org_width} 27 | 28 | def get_label(self, idx): 29 | data = load_pickle(f'{self.cfg.dir["pre0"]}/{self.datalist[idx]}') 30 | 31 | seg_label = np.zeros((self.cfg.height, self.cfg.width), dtype=np.uint8) 32 | seg_label = np.ascontiguousarray(seg_label) 33 | 34 | lane_pts = list() 35 | for i in range(len(data['lane'])): 36 | pts_org = np.float32(data['lane'][i]['points']) 37 | lane_pts.append(pts_org) 38 | pts = np.copy(pts_org) 39 | pts[:, 0] = pts_org[:, 0] / (self.org_width - 1) * (self.cfg.width - 1) 40 | pts[:, 1] = pts_org[:, 1] / (self.org_height - 1) * (self.cfg.height + self.cfg.crop_size - 1) - self.cfg.crop_size 41 | pts = np.int32(pts).reshape((-1, 1, 2)) 42 | seg_label = cv2.polylines(seg_label, [pts], False, 1, 4) 43 | 44 | return {'label': np.float32(seg_label), 45 | 'lane_pts': lane_pts} 46 | 47 | def __getitem__(self, idx): 48 | out = dict() 49 | out['img_name'] = self.datalist[idx] 50 | out.update(self.get_image(idx)) 51 | out.update(self.get_label(idx)) 52 | 53 | return out 54 | 55 | def __len__(self): 56 | return len(self.datalist) 57 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P01_lane_representation/code/datasets/dataset_vil100.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | 3 | import torchvision.transforms as transforms 4 | from torch.utils.data import Dataset 5 | from PIL import Image 6 | 7 | from libs.utils import * 8 | 9 | class Dataset_Train(Dataset): 10 | def __init__(self, cfg): 11 | self.cfg = cfg 12 | self.datalist = load_pickle(cfg.dir['pre0'] + 'datalist') 13 | 14 | self.transform = transforms.Compose([transforms.Resize((cfg.height + cfg.crop_size, cfg.width), interpolation=2), transforms.ToTensor()]) 15 | self.normalize = transforms.Normalize(mean=cfg.mean, std=cfg.std) 16 | 17 | def get_image(self, idx, flip=0): 18 | img = Image.open(f'{self.cfg.dir["dataset"]}/JPEGImages/{self.datalist[idx]}.jpg').convert('RGB') 19 | self.org_width, self.org_height = img.size 20 | if flip == 1: 21 | img = img.transpose(Image.FLIP_LEFT_RIGHT) 22 | img = self.transform(img) 23 | img = img[:, self.cfg.crop_size:, :] 24 | 25 | return {'img': self.normalize(img), 26 | 'img_rgb': img, 27 | 'org_h': self.org_height, 'org_w': self.org_width} 28 | 29 | def get_label(self, idx): 30 | data = load_pickle(f'{self.cfg.dir["pre0"]}/{self.datalist[idx]}') 31 | 32 | seg_label = np.zeros((self.cfg.height, self.cfg.width), dtype=np.uint8) 33 | seg_label = np.ascontiguousarray(seg_label) 34 | 35 | lane_pts = list() 36 | for i in range(len(data['lane'])): 37 | pts_org = np.float32(data['lane'][i]['points']) 38 | lane_pts.append(pts_org) 39 | pts = np.copy(pts_org) 40 | pts[:, 0] = pts_org[:, 0] / (self.org_width - 1) * (self.cfg.width - 1) 41 | pts[:, 1] = pts_org[:, 1] / (self.org_height - 1) * (self.cfg.height + self.cfg.crop_size - 1) - self.cfg.crop_size 42 | pts = np.int32(pts).reshape((-1, 1, 2)) 43 | seg_label = cv2.polylines(seg_label, [pts], False, 1, 4) 44 | 45 | return {'label': np.float32(seg_label), 46 | 'lane_pts': lane_pts} 47 | 48 | def __getitem__(self, idx): 49 | out = dict() 50 | out['img_name'] = self.datalist[idx] 51 | out.update(self.get_image(idx)) 52 | out.update(self.get_label(idx)) 53 | 54 | return out 55 | 56 | def __len__(self): 57 | return len(self.datalist) 58 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/src/counter.cpp" "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o" 8 | "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/src/evaluate.cpp" "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o" 9 | "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/src/lane_compare.cpp" "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o" 10 | "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/src/spline.cpp" "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o" 11 | ) 12 | set(CMAKE_CXX_COMPILER_ID "GNU") 13 | 14 | # Preprocessor definitions for this target. 15 | set(CMAKE_TARGET_DEFINITIONS_CXX 16 | "CPU_ONLY" 17 | ) 18 | 19 | # The include file search paths: 20 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 21 | "../include" 22 | "/usr/local/include/opencv4" 23 | ) 24 | 25 | # Targets to which this target links. 26 | set(CMAKE_TARGET_LINKED_INFO_FILES 27 | ) 28 | 29 | # Fortran module output directory. 30 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 31 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/src/counter.cpp" "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/counter.cpp.o" 8 | "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/src/evaluate.cpp" "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/evaluate.cpp.o" 9 | "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/src/lane_compare.cpp" "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/lane_compare.cpp.o" 10 | "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/src/spline.cpp" "/media/dkjin/4fefb28c-5de9-4abd-a935-aa2d61392048/Work/Current/Lane_detection/Project_02/P02_Modeling/VIL-100/E01_point_regression/code_v01_for_eval/evaluation/culane/build/CMakeFiles/culane_evaluator.dir/src/spline.cpp.o" 11 | ) 12 | set(CMAKE_CXX_COMPILER_ID "GNU") 13 | 14 | # Preprocessor definitions for this target. 15 | set(CMAKE_TARGET_DEFINITIONS_CXX 16 | "CPU_ONLY" 17 | ) 18 | 19 | # The include file search paths: 20 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 21 | "../include" 22 | "/usr/local/include/opencv4" 23 | ) 24 | 25 | # Targets to which this target links. 26 | set(CMAKE_TARGET_LINKED_INFO_FILES 27 | ) 28 | 29 | # Fortran module output directory. 30 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 31 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "CMakeFiles/3.5.1/CMakeCCompiler.cmake" 11 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 12 | "CMakeFiles/3.5.1/CMakeSystem.cmake" 13 | "CMakeLists.txt" 14 | "/home/ubuntu/anaconda3/envs/py37/share/OpenCV/OpenCVConfig-version.cmake" 15 | "/home/ubuntu/anaconda3/envs/py37/share/OpenCV/OpenCVConfig.cmake" 16 | "/home/ubuntu/anaconda3/envs/py37/share/OpenCV/OpenCVModules-release.cmake" 17 | "/home/ubuntu/anaconda3/envs/py37/share/OpenCV/OpenCVModules.cmake" 18 | "/usr/share/cmake-3.5/Modules/CMakeCInformation.cmake" 19 | "/usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake" 20 | "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" 21 | "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" 22 | "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" 23 | "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake" 24 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" 25 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" 26 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-C.cmake" 27 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX.cmake" 28 | "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" 29 | "/usr/share/cmake-3.5/Modules/FindOpenMP.cmake" 30 | "/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake" 31 | "/usr/share/cmake-3.5/Modules/FindPackageMessage.cmake" 32 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-C.cmake" 33 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-CXX.cmake" 34 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" 35 | "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" 36 | "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" 37 | ) 38 | 39 | # The corresponding makefile is: 40 | set(CMAKE_MAKEFILE_OUTPUTS 41 | "Makefile" 42 | "CMakeFiles/cmake.check_cache" 43 | ) 44 | 45 | # Byproducts of CMake generate step: 46 | set(CMAKE_MAKEFILE_PRODUCTS 47 | "CMakeFiles/CMakeDirectoryInformation.cmake" 48 | ) 49 | 50 | # Dependency information for all targets: 51 | set(CMAKE_DEPEND_INFO_FILES 52 | "CMakeFiles/culane_evaluator.dir/DependInfo.cmake" 53 | ) 54 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "CMakeFiles/3.5.1/CMakeCCompiler.cmake" 11 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 12 | "CMakeFiles/3.5.1/CMakeSystem.cmake" 13 | "CMakeLists.txt" 14 | "/home/ubuntu/anaconda3/envs/py37/share/OpenCV/OpenCVConfig-version.cmake" 15 | "/home/ubuntu/anaconda3/envs/py37/share/OpenCV/OpenCVConfig.cmake" 16 | "/home/ubuntu/anaconda3/envs/py37/share/OpenCV/OpenCVModules-release.cmake" 17 | "/home/ubuntu/anaconda3/envs/py37/share/OpenCV/OpenCVModules.cmake" 18 | "/usr/share/cmake-3.5/Modules/CMakeCInformation.cmake" 19 | "/usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake" 20 | "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" 21 | "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" 22 | "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" 23 | "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake" 24 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" 25 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" 26 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-C.cmake" 27 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX.cmake" 28 | "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" 29 | "/usr/share/cmake-3.5/Modules/FindOpenMP.cmake" 30 | "/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake" 31 | "/usr/share/cmake-3.5/Modules/FindPackageMessage.cmake" 32 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-C.cmake" 33 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-CXX.cmake" 34 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" 35 | "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" 36 | "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" 37 | ) 38 | 39 | # The corresponding makefile is: 40 | set(CMAKE_MAKEFILE_OUTPUTS 41 | "Makefile" 42 | "CMakeFiles/cmake.check_cache" 43 | ) 44 | 45 | # Byproducts of CMake generate step: 46 | set(CMAKE_MAKEFILE_PRODUCTS 47 | "CMakeFiles/CMakeDirectoryInformation.cmake" 48 | ) 49 | 50 | # Dependency information for all targets: 51 | set(CMAKE_DEPEND_INFO_FILES 52 | "CMakeFiles/culane_evaluator.dir/DependInfo.cmake" 53 | ) 54 | -------------------------------------------------------------------------------- /Preprocessing/VIL-100/P03_video_based_datalist/code/options/config.py: -------------------------------------------------------------------------------- 1 | import os 2 | import torch 3 | 4 | import numpy as np 5 | 6 | class Config(object): 7 | def __init__(self): 8 | # --------basics-------- # 9 | self.setting_for_system() 10 | self.setting_for_path() 11 | self.setting_for_image_param() 12 | self.setting_for_dataloader() 13 | self.setting_for_visualization() 14 | self.setting_for_save() 15 | # --------preprocessing-------- # 16 | self.setting_for_video_based() 17 | # --------others-------- # 18 | 19 | def setting_for_system(self): 20 | self.gpu_id = "0" 21 | self.seed = 123 22 | os.environ["CUDA_VISIBLE_DEVICES"] = self.gpu_id 23 | torch.backends.cudnn.deterministic = True 24 | 25 | def setting_for_path(self): 26 | self.pc = 'main' 27 | self.dir = dict() 28 | self.setting_for_dataset_path() # dataset path 29 | 30 | self.dir['proj'] = os.path.dirname(os.getcwd()) 31 | self.dir['head_proj'] = os.path.dirname(self.dir['proj']) 32 | self.dir['pre0'] = f'{self.dir["head_proj"]}/P00_data_processing/output_{self.datalist_mode}/pickle' 33 | self.dir['pre2'] = f'{self.dir["head_proj"]}/P02_SVD/output_train/pickle' 34 | self.dir['out'] = f'{os.getcwd().replace("code", "output")}_{self.datalist_mode}' 35 | 36 | def setting_for_dataset_path(self): 37 | self.dataset = 'vil100' # ['vil100'] 38 | self.datalist_mode = 'train' # ['train', 'test'] 39 | 40 | # ------------------- need to modify ------------------- 41 | self.dir['dataset'] = '--dataset_dir' 42 | # ------------------------------------------------------ 43 | 44 | def setting_for_image_param(self): 45 | self.height = 320 46 | self.width = 800 47 | self.size = [self.width, self.height, self.width, self.height] 48 | self.mean = [0.485, 0.456, 0.406] 49 | self.std = [0.229, 0.224, 0.225] 50 | self.crop_size = 120 51 | 52 | def setting_for_dataloader(self): 53 | self.num_workers = 4 54 | self.batch_size = 1 55 | self.data_flip = True 56 | 57 | def setting_for_visualization(self): 58 | self.display_all = True 59 | 60 | def setting_for_save(self): 61 | self.save_pickle = True 62 | 63 | def setting_for_video_based(self): 64 | self.num_t = 3 # use {} frames 65 | self.clip_length = 3 66 | -------------------------------------------------------------------------------- /Preprocessing/OpenLane-V/P03_video_based_datalist/code/options/config.py: -------------------------------------------------------------------------------- 1 | import os 2 | import torch 3 | 4 | import numpy as np 5 | 6 | class Config(object): 7 | def __init__(self): 8 | # --------basics-------- # 9 | self.setting_for_system() 10 | self.setting_for_path() 11 | self.setting_for_image_param() 12 | self.setting_for_dataloader() 13 | self.setting_for_visualization() 14 | self.setting_for_save() 15 | # --------preprocessing-------- # 16 | self.setting_for_video_based() 17 | # --------others-------- # 18 | 19 | def setting_for_system(self): 20 | self.gpu_id = "0" 21 | self.seed = 123 22 | os.environ["CUDA_VISIBLE_DEVICES"] = self.gpu_id 23 | torch.backends.cudnn.deterministic = True 24 | 25 | def setting_for_path(self): 26 | self.pc = 'main' 27 | self.dir = dict() 28 | self.setting_for_dataset_path() # dataset path 29 | 30 | self.dir['proj'] = os.path.dirname(os.getcwd()) 31 | self.dir['head_proj'] = os.path.dirname(self.dir['proj']) 32 | self.dir['pre2'] = f'{self.dir["head_proj"]}/P02_SVD/output_{self.datalist_mode}/pickle' 33 | self.dir['out'] = f'{os.getcwd().replace("code", "output")}_{self.datalist_mode}' 34 | 35 | def setting_for_dataset_path(self): 36 | self.dataset = 'openlane' # ['vil100'] 37 | self.datalist_mode = 'training' # ['training', 'testing', 'validation'] 38 | 39 | # ------------------- need to modify ------------------- 40 | self.dir['dataset'] = '--dataset path' 41 | # ------------------------------------------------------ 42 | 43 | def setting_for_image_param(self): 44 | self.org_height = 1280 45 | self.org_width = 1920 46 | self.height = 384 47 | self.width = 640 48 | self.size = [self.width, self.height, self.width, self.height] 49 | self.mean = [0.485, 0.456, 0.406] 50 | self.std = [0.229, 0.224, 0.225] 51 | self.crop_size = 480 52 | 53 | def setting_for_dataloader(self): 54 | self.num_workers = 4 55 | self.batch_size = 1 56 | self.data_flip = False 57 | 58 | def setting_for_visualization(self): 59 | self.display_all = False 60 | 61 | def setting_for_save(self): 62 | self.save_pickle = True 63 | 64 | def setting_for_video_based(self): 65 | self.num_t = 3 # use previous {} frames 66 | self.clip_length = 3 67 | -------------------------------------------------------------------------------- /Modeling/VIL-100/PLD/code/evaluation/culane/build/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "../CMakeLists.txt" 11 | "CMakeFiles/3.10.2/CMakeCCompiler.cmake" 12 | "CMakeFiles/3.10.2/CMakeCXXCompiler.cmake" 13 | "CMakeFiles/3.10.2/CMakeSystem.cmake" 14 | "/usr/local/lib/cmake/opencv4/OpenCVConfig-version.cmake" 15 | "/usr/local/lib/cmake/opencv4/OpenCVConfig.cmake" 16 | "/usr/local/lib/cmake/opencv4/OpenCVModules-release.cmake" 17 | "/usr/local/lib/cmake/opencv4/OpenCVModules.cmake" 18 | "/usr/share/cmake-3.10/Modules/CMakeCInformation.cmake" 19 | "/usr/share/cmake-3.10/Modules/CMakeCXXInformation.cmake" 20 | "/usr/share/cmake-3.10/Modules/CMakeCommonLanguageInclude.cmake" 21 | "/usr/share/cmake-3.10/Modules/CMakeGenericSystem.cmake" 22 | "/usr/share/cmake-3.10/Modules/CMakeLanguageInformation.cmake" 23 | "/usr/share/cmake-3.10/Modules/CMakeParseImplicitLinkInfo.cmake" 24 | "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInformation.cmake" 25 | "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInitialize.cmake" 26 | "/usr/share/cmake-3.10/Modules/Compiler/CMakeCommonCompilerMacros.cmake" 27 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-C.cmake" 28 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-CXX.cmake" 29 | "/usr/share/cmake-3.10/Modules/Compiler/GNU.cmake" 30 | "/usr/share/cmake-3.10/Modules/FindOpenMP.cmake" 31 | "/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake" 32 | "/usr/share/cmake-3.10/Modules/FindPackageMessage.cmake" 33 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-C.cmake" 34 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-CXX.cmake" 35 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU.cmake" 36 | "/usr/share/cmake-3.10/Modules/Platform/Linux.cmake" 37 | "/usr/share/cmake-3.10/Modules/Platform/UnixPaths.cmake" 38 | ) 39 | 40 | # The corresponding makefile is: 41 | set(CMAKE_MAKEFILE_OUTPUTS 42 | "Makefile" 43 | "CMakeFiles/cmake.check_cache" 44 | ) 45 | 46 | # Byproducts of CMake generate step: 47 | set(CMAKE_MAKEFILE_PRODUCTS 48 | "CMakeFiles/CMakeDirectoryInformation.cmake" 49 | ) 50 | 51 | # Dependency information for all targets: 52 | set(CMAKE_DEPEND_INFO_FILES 53 | "CMakeFiles/culane_evaluator.dir/DependInfo.cmake" 54 | ) 55 | -------------------------------------------------------------------------------- /Modeling/VIL-100/ILD_coeff/code/evaluation/culane/build/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "../CMakeLists.txt" 11 | "CMakeFiles/3.10.2/CMakeCCompiler.cmake" 12 | "CMakeFiles/3.10.2/CMakeCXXCompiler.cmake" 13 | "CMakeFiles/3.10.2/CMakeSystem.cmake" 14 | "/usr/local/lib/cmake/opencv4/OpenCVConfig-version.cmake" 15 | "/usr/local/lib/cmake/opencv4/OpenCVConfig.cmake" 16 | "/usr/local/lib/cmake/opencv4/OpenCVModules-release.cmake" 17 | "/usr/local/lib/cmake/opencv4/OpenCVModules.cmake" 18 | "/usr/share/cmake-3.10/Modules/CMakeCInformation.cmake" 19 | "/usr/share/cmake-3.10/Modules/CMakeCXXInformation.cmake" 20 | "/usr/share/cmake-3.10/Modules/CMakeCommonLanguageInclude.cmake" 21 | "/usr/share/cmake-3.10/Modules/CMakeGenericSystem.cmake" 22 | "/usr/share/cmake-3.10/Modules/CMakeLanguageInformation.cmake" 23 | "/usr/share/cmake-3.10/Modules/CMakeParseImplicitLinkInfo.cmake" 24 | "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInformation.cmake" 25 | "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInitialize.cmake" 26 | "/usr/share/cmake-3.10/Modules/Compiler/CMakeCommonCompilerMacros.cmake" 27 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-C.cmake" 28 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-CXX.cmake" 29 | "/usr/share/cmake-3.10/Modules/Compiler/GNU.cmake" 30 | "/usr/share/cmake-3.10/Modules/FindOpenMP.cmake" 31 | "/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake" 32 | "/usr/share/cmake-3.10/Modules/FindPackageMessage.cmake" 33 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-C.cmake" 34 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-CXX.cmake" 35 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU.cmake" 36 | "/usr/share/cmake-3.10/Modules/Platform/Linux.cmake" 37 | "/usr/share/cmake-3.10/Modules/Platform/UnixPaths.cmake" 38 | ) 39 | 40 | # The corresponding makefile is: 41 | set(CMAKE_MAKEFILE_OUTPUTS 42 | "Makefile" 43 | "CMakeFiles/cmake.check_cache" 44 | ) 45 | 46 | # Byproducts of CMake generate step: 47 | set(CMAKE_MAKEFILE_PRODUCTS 48 | "CMakeFiles/CMakeDirectoryInformation.cmake" 49 | ) 50 | 51 | # Dependency information for all targets: 52 | set(CMAKE_DEPEND_INFO_FILES 53 | "CMakeFiles/culane_evaluator.dir/DependInfo.cmake" 54 | ) 55 | -------------------------------------------------------------------------------- /Modeling/OpenLane-V/ILD_seg/code/evaluation/evaluate.py: -------------------------------------------------------------------------------- 1 | import os 2 | import cv2 3 | import torch 4 | import math 5 | 6 | import numpy as np 7 | 8 | from libs.utils import * 9 | 10 | class Evaluation(object): 11 | def __init__(self, cfg): 12 | self.cfg = cfg 13 | self.sf = cfg.scale_factor['seg'] 14 | 15 | def measure_IoU(self, X1, X2): 16 | ep = 1e-7 17 | X = X1 + X2 18 | X_uni = torch.sum(X != 0, dim=(1, 2)).type(torch.float32) 19 | X_inter = torch.sum(X == 2, dim=(1, 2)).type(torch.float32) 20 | iou = X_inter / (X_uni + ep) 21 | return iou 22 | 23 | def run_for_miou(self): 24 | iou = self.measure_IoU(self.b_map, self.seg_map_gt) 25 | self.results['miou'] += list(to_np(iou)) 26 | 27 | def run_for_fscore(self): 28 | table = (self.b_map + 1) * (self.seg_map_gt + 2) 29 | self.results['tp'] += list(to_np(torch.sum(table == 6, dim=(1, 2)))) 30 | self.results['tn'] += list(to_np(torch.sum(table == 2, dim=(1, 2)))) 31 | self.results['fp'] += list(to_np(torch.sum(table == 4, dim=(1, 2)))) 32 | self.results['fn'] += list(to_np(torch.sum(table == 3, dim=(1, 2)))) 33 | 34 | def measure(self): 35 | ep = 1e-7 36 | results = load_pickle(f'{self.cfg.dir["out"]}/{self.mode}/pickle/eval_seg_results') 37 | 38 | # miou = np.mean(np.float32(results['miou'])) 39 | tp = np.sum(np.float32(results['tp'])) 40 | fp = np.sum(np.float32(results['fp'])) 41 | fn = np.sum(np.float32(results['fn'])) 42 | precision = tp / (tp + fp + ep) 43 | recall = tp / (tp + fn + ep) 44 | fscore = 2 * precision * recall / (precision + recall + ep) 45 | 46 | # print(f'\nmean IoU : {miou}\n') 47 | print(f'\nprecision {precision}, recall {recall}, fscore {fscore}\n') 48 | return {'seg_precision': precision, 'seg_recall': recall, 'seg_fscore': fscore} 49 | 50 | def init(self): 51 | self.results = dict() 52 | self.results['miou'] = list() 53 | self.results['tp'] = list() 54 | self.results['tn'] = list() 55 | self.results['fp'] = list() 56 | self.results['fn'] = list() 57 | self.results['precision'] = 0 58 | self.results['recall'] = 0 59 | self.results['fscore'] = 0 60 | 61 | def update(self, batch, out, mode): 62 | self.mode = mode 63 | self.seg_map = out['seg_map'] 64 | self.b_map = (self.seg_map > self.cfg.prob_thresd).type(torch.long)[:, 0] 65 | self.seg_map_gt = batch['seg_label'][self.sf[0]] --------------------------------------------------------------------------------