{"id":7095,"date":"2025-09-11T06:00:00","date_gmt":"2025-09-11T11:00:00","guid":{"rendered":"https:\/\/lab.rivas.ai\/?p=7095"},"modified":"2025-09-11T13:47:08","modified_gmt":"2025-09-11T18:47:08","slug":"near-real%e2%80%91time-dust-detection-with-3d-cnns-21x-faster-training","status":"publish","type":"post","link":"https:\/\/lab.rivas.ai\/?p=7095","title":{"rendered":"Dust Detection with 3D CNNs &amp; 21\u00d7 Faster Training"},"content":{"rendered":"<article>\n<header>\n<p class=\"meta-description\">We present a 3\u2011D CNN pipeline that detects dust storms from MODIS data with 91.1% accuracy while cutting training time by 21\u2011fold, enabling near\u2011real\u2011time monitoring.<\/p>\n<p class=\"deck\">We built a three\u2011block 3\u2011D convolutional network that learns spatial\u2011spectral patterns from MODIS Terra and Aqua imagery, then added system\u2011level tricks, memory\u2011mapped I\/O, precomputed patch indices, large\u2011batch training, torch.compile, and mixed\u2011precision, to create the accelerated 3DCNN+ variant.<\/p>\n<p>Code is available here: <a href=\"https:\/\/github.com\/Rivas-AI\/dust-3dcnn.git\">https:\/\/github.com\/Rivas-AI\/dust-3dcnn.git<\/a><\/p>\n<\/header>\n<nav class=\"toc\">\n<ul>\n<li><a href=\"#tldr\">TL;DR<\/a><\/li>\n<li><a href=\"#why-it-matters\">Why it matters<\/a><\/li>\n<li><a href=\"#how-it-works\">How it works<\/a><\/li>\n<li><a href=\"#results\">What we found<\/a><\/li>\n<li><a href=\"#equation\">Key equation<\/a><\/li>\n<li><a href=\"#limits\">Limits and next steps<\/a><\/li>\n<li><a href=\"#faq\">FAQ<\/a><\/li>\n<li><a href=\"#read-the-paper\">Read the paper<\/a><\/li>\n<\/ul>\n<\/nav>\n<section id=\"tldr\">\n<h2>TL;DR<\/h2>\n<ul>\n<li>We detect dust storms from MODIS multispectral imagery using a 3\u2011D CNN pipeline.<\/li>\n<li>Our optimized 3DCNN+ reaches 91.1% pixel\u2011level accuracy with a 21\u00d7 training speedup.<\/li>\n<li>The combination of memory\u2011mapped data handling and mixed\u2011precision training makes near\u2011real\u2011time inference feasible.<\/li>\n<\/ul>\n<\/section>\n<section id=\"why-it-matters\">\n<h2>Why it matters<\/h2>\n<p>Dust storms degrade air quality, threaten aviation safety, and impact climate models. Rapid, reliable detection from satellite data is essential for public\u2011health alerts and operational forecasting. Traditional remote\u2011sensing pipelines struggle with the sheer volume of MODIS granules and with the latency introduced by heavyweight deep\u2011learning models. By drastically reducing training time and enabling full\u2011granule inference, our approach brings dust\u2011storm monitoring closer to real\u2011time operation, supporting timely decision\u2011making for agencies worldwide.<\/p>\n<\/section>\n<section id=\"how-it-works\">\n<h2>How it works<\/h2>\n<p>We first collect MODIS Terra and Aqua observations, each providing 38 spectral channels at 1\u2011km resolution. Missing pixels are filled using a local imputation scheme, then each channel is normalized to zero mean and unit variance. From each granule we extract overlapping 5\u202f\u00d7\u202f5\u202f\u00d7\u202f38 patches, which serve as inputs to a three\u2011block 3\u2011D convolutional neural network. The network learns joint spatial\u2011spectral features that distinguish dust\u2011laden pixels from clear sky, water, and vegetation. During training we compute a weighted mean\u2011squared error loss that emphasizes high\u2011intensity dust regions. The optimized 3DCNN+ variant adds five system\u2011level tricks: (1) memory\u2011mapped storage of the full dataset, (2) precomputed indices that guarantee valid patch centers, (3) large\u2011batch training (up to 32\u202f768 patches per step), (4) torch.compile\u2011based graph optimization, and (5) automatic mixed\u2011precision arithmetic. Together these enable fast GPU utilization and dramatically shorter training epochs.<\/p>\n<\/section>\n<section id=\"results\">\n<h2>What we found<\/h2>\n<p>Our experiments used 117 MODIS granules (100 for training, 17 for testing) that span deserts, coastal regions, and agricultural lands. The baseline 3DCNN achieved 91.1% accuracy and a mean\u2011squared error (MSE) of 0.020. After applying the five optimizations, 3DCNN+ retained the same 91.1% accuracy while reducing MSE to 0.014. Most importantly, the total wall\u2011clock training time dropped from roughly 12\u202fhours to under 35\u202fminutes, a 21\u2011fold speedup. Inference on a full granule (\u22481\u202fGB of radiance data) runs in less than two seconds on an A100 GPU, confirming that near\u2011real\u2011time deployment is practical.<\/p>\n<ul>\n<li>Pixel\u2011level classification accuracy: 91.1% (consistent across all test regions).<\/li>\n<li>Weighted MSE for the optimized model: 0.014, reflecting tighter fit on high\u2011dust pixels.<\/li>\n<li>Training speedup: 21\u00d7 using the 3DCNN+ system enhancements.<\/li>\n<li>Data efficiency: memory\u2011mapped I\/O reduced RAM usage by more than 90%, allowing us to train on the entire MODIS archive without down\u2011sampling.<\/li>\n<\/ul>\n<\/section>\n<section id=\"equation\">\n<h2>Key equation<\/h2>\n<div>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 45px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rivas.ai\/wp-content\/ql-cache\/quicklatex.com-bdaf973c3a644f50ce284a270f9fcc1b_l3.png\" height=\"45\" width=\"251\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#76;&#95;&#123;&#92;&#116;&#101;&#120;&#116;&#123;&#87;&#77;&#83;&#69;&#125;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#92;&#115;&#117;&#109;&#95;&#105;&#32;&#119;&#95;&#105;&#125;&#92;&#115;&#117;&#109;&#95;&#105;&#32;&#119;&#95;&#105;&#32;&#40;&#121;&#95;&#105;&#32;&#45;&#32;&#92;&#104;&#97;&#116;&#123;&#121;&#125;&#95;&#105;&#41;&#94;&#50;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<\/div>\n<p>The weighted MSE (WMSE) assigns larger weights\u202f<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rivas.ai\/wp-content\/ql-cache\/quicklatex.com-b04985ab74ff705ec05c507ed58afebd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#119;&#95;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"11\" width=\"18\" style=\"vertical-align: -3px;\"\/> to pixels with strong dust signatures, ensuring that the loss focuses on the most scientifically relevant portions of the scene.<\/p>\n<\/section>\n<section id=\"limits\">\n<h2>Limits and next steps<\/h2>\n<p>While 3DCNN+ delivers high accuracy and speed, we observed three recurring sources of error that limit performance:<\/p>\n<ul>\n<li><strong>Label imbalance:<\/strong> Dust pixels represent a small fraction of all MODIS samples, causing the model to under\u2011represent rare dust events.<\/li>\n<li><strong>Spatial overfitting:<\/strong> The receptive field of three\u2011by\u2011three convolutions can miss larger\u2011scale dust structures that extend beyond the 5\u202f\u00d7\u202f5 patch.<\/li>\n<li><strong>Limited temporal context:<\/strong> MODIS provides only a single snapshot per overpass; without multi\u2011temporal cues the model sometimes confuses dust with bright surfaces.<\/li>\n<\/ul>\n<p>To address these issues, we are exploring transformer\u2011based architectures that can aggregate information over larger spatial extents and multiple time steps. In particular, the proposed Autoregressive Masked Autoencoder Swin Transformer (AR\u2011MAE\u2011Swin) constrains model capacity by reducing the effective Vapnik\u2013Chervonenkis (VC) dimension by a factor\u202f<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rivas.ai\/wp-content\/ql-cache\/quicklatex.com-6f8640d20426752f2441841d209091d4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;&#45;&#92;&#97;&#108;&#112;&#104;&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"41\" style=\"vertical-align: 0px;\"\/>, which our theoretical analysis predicts will improve sample efficiency by roughly 30%. Future work will also incorporate self\u2011supervised pretraining on unlabeled MODIS sequences, and will test the pipeline on other aerosol phenomena such as smoke and volcanic ash.<\/p>\n<\/section>\n<section id=\"faq\">\n<h2>FAQ<\/h2>\n<dl>\n<dt>Can the pipeline run on commodity hardware?<\/dt>\n<dd>Yes. Because the bulk of the data resides on disk and is accessed via memory\u2011mapping, only a small fraction needs to be loaded into RAM. Mixed\u2011precision training further reduces GPU memory requirements, allowing the model to run on a single modern GPU (e.g., RTX\u202f3080) without sacrificing accuracy.<\/dd>\n<dt>How does the weighted loss affect dust\u2011storm maps?<\/dt>\n<dd>The weighted mean\u2011squared error gives higher penalty to mis\u2011classifications in regions with strong dust reflectance. This focuses the optimizer on the most hazardous pixels, resulting in cleaner, more reliable dust masks that align with ground\u2011based observations.<\/dd>\n<\/dl>\n<\/section>\n<section id=\"read-the-paper\">\n<h2>Read the paper<\/h2>\n<p>For a complete technical description, dataset details, and the full theoretical analysis, please consult the original manuscript.<\/p>\n<\/section>\n<p>Gates, C., Moorhead, P., Ferguson, J., Darwish, O., Stallman, C., Rivas, P., &amp; Quansah, P. (2025, July). Near Real-Time Dust Aerosol Detection with 3D Convolutional Neural Networks on MODIS Data. In Proceedings of the 29th International Conference on Image Processing, Computer Vision, &amp; Pattern Recognition (IPCV&#8217;25) of the 2025 World Congress in Computer Science, Computer Engineering, and Applied Computing (CSCE&#8217;25) (pp. 1\u201313). Las Vegas, NV, USA.<\/p>\n<p><a href=\"https:\/\/rivas.ai\/pdfs\/gates2025dustaerosol.pdf\">Download PDF<\/a><\/p>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>We present a 3\u2011D CNN pipeline that detects dust storms from MODIS data with 91.1% accuracy while cutting training time by 21\u2011fold, enabling near\u2011real\u2011time monitoring. We built a three\u2011block 3\u2011D convolutional network that learns spatial\u2011spectral patterns from MODIS Terra and Aqua imagery, then added system\u2011level tricks\u2014memory\u2011mapped I\/O, precomputed patch indices, large\u2011batch training, torch.compile, and mixed\u2011precision\u2014to create the accelerated 3DCNN+ variant.<\/p>\n","protected":false},"author":11,"featured_media":7094,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[6],"class_list":["post-7095","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-computer-vision"],"jetpack_featured_media_url":"https:\/\/lab.rivas.ai\/wp-content\/uploads\/2025\/09\/Du90q-cover.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=\/wp\/v2\/posts\/7095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7095"}],"version-history":[{"count":2,"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=\/wp\/v2\/posts\/7095\/revisions"}],"predecessor-version":[{"id":7098,"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=\/wp\/v2\/posts\/7095\/revisions\/7098"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=\/wp\/v2\/media\/7094"}],"wp:attachment":[{"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab.rivas.ai\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}