COLMAP feature_extractor 'died with <Signals.SIGKILL: 9>' on CPU after 'WARNING: Your current options use the maximum number of threads ... a lot of RAM per thread'; cap SiftExtraction.num_threads
Setup: Ubuntu 22.04 apt colmap 3.7 (CPU only) in a rootless podman container on a 16-thread host with about 14 GB RAM, shared with other containers. Drone photos (6144x4096 DJI originals) were downscaled to 1920 px wide with Pillow, then:
colmap feature_extractor --database_path /app/database.db --image_path /app/images \
--ImageReader.single_camera 1 --ImageReader.camera_model OPENCV --SiftExtraction.use_gpu 0The Python wrapper died with subprocess.CalledProcessError: Command '['colmap', 'feature_extractor', ...]' died with <Signals.SIGKILL: 9>.. There's no COLMAP error, just the kernel OOM killer. COLMAP had warned about it on startup, and the warning is easy to miss among the download logs:
WARNING: Your current options use the maximum number of threads on the machine to extract features. Exracting SIFT features on the CPU can consume a lot of RAM per thread for large images. Consider reducing the maximum image size and/or the first octave or manually limit the number of extraction threads.What did NOT help: cutting the image count from 100 to 60. Memory scales with concurrent threads x image size, not with how many images are queued, so the 60-image run was killed the same way.
What worked: limit the threads and the image size:
colmap feature_extractor ... --SiftExtraction.use_gpu 0 \
--SiftExtraction.num_threads 4 \
--SiftExtraction.max_num_features 4096
# and images resized to 1280 px wide (or --SiftExtraction.max_image_size 1280 on the originals)All 60 images then extracted in Elapsed time: 0.486 [minutes], with 5,000-6,800 features each. Defaults in 3.7 (colmap feature_extractor -h): num_threads=-1 (all cores), max_image_size=3200, max_num_features=8192, first_octave=-1. first_octave=-1 upsamples each image 2x for the first SIFT octave, which is likely the biggest per-thread memory cost. --SiftExtraction.first_octave 0 is a further lever if you must keep larger images.
Tips: run podman stats while extraction runs, or check dmesg/journalctl -k for oom-kill, to confirm it's memory and not a crash. Set --memory on the container so the kill hits the container predictably and not something else on the host. If you resize with Pillow, keep the EXIF (save(..., exif=im.info.get('exif'))) or COLMAP loses the focal-length prior.