DeepCrack
DeepCrack copied to clipboard
Testing the pre-trained model
I'm trying to test the pre-trained model on some images. What is the input of the model in test_index.txt? The path in train_example.txt is like: /home/yueyuanhao/deepcrack/data/CrackTree/crack_train_image/6192_rot0_crop1_mirror0.jpg /home/yueyuanhao/deepcrack/data/CrackTree/crack_train_mask/6192_rot0_crop1_mirror0.png
Do we need a pair of images for testing as well or single image separated by space?
I tested with space separated paths of images, but it is giving the following error:
RuntimeError: CUDA out of memory. Tried to allocate 378.00 MiB (GPU 0; 10.76 GiB total capacity; 9.19 GiB already allocated; 54.44 MiB free; 9.59 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Maybe you can use the os library to get the path to the picture, and then use the loop to write to the txt file. like this file test_example.txt in your error,maybe you can set the num_worker=0 or 1,or reduce the size of your image when you read the image
I'm triying to test the pre-trained model 'DeepCrack_CT260_FT1.pth'. The results are something like this
I want to use your code to figure out some 'crack detection' tasks in my reasearch field. Can you help me?
This is a problem raised by your GPU or CUDA settings. You can set the CPU as the computing unit to generate results for comparison.
Solved, thanks! LOL