Rapid and robust on-scene detection of cocaine in street samples using a handheld near-infrared spectrometer and machine learning algorithms

Ruben F. Kranenburg*, Joshka Verduin, Yannick Weesepoel, Martin Alewijn, Marcel Heerschop, Ger Koomen, Peter Keizers, Frank Bakker, Fionn Wallace, Annette van Esch, Annemieke Hulsbergen, Arian C. van Asten

*Corresponding author for this work

Research output: Contribution to journalArticleAcademicpeer-review

2 Citations (Scopus)


On-scene drug detection is an increasingly significant challenge due to the fast-changing drug market as well as the risk of exposure to potent drug substances. Conventional colorimetric cocaine tests involve handling of the unknown material and are prone to false-positive reactions on common pharmaceuticals used as cutting agents. This study demonstrates the novel application of 740–1070 nm small-wavelength-range near-infrared (NIR) spectroscopy to confidently detect cocaine in case samples. Multistage machine learning algorithms are used to exploit the limited spectral features and predict not only the presence of cocaine but also the concentration and sample composition. A model based on more than 10,000 spectra from case samples yielded 97% true-positive and 98% true-negative results. The practical applicability is shown in more than 100 case samples not included in the model design. One of the most exciting aspects of this on-scene approach is that the model can almost instantly adapt to changes in the illicit-drug market by updating metadata with results from subsequent confirmatory laboratory analyses. These results demonstrate that advanced machine learning strategies applied on limited-range NIR spectra from economic handheld sensors can be a valuable procedure for rapid on-site detection of illicit substances by investigating officers. In addition to forensics, this interesting approach could be beneficial for screening and classification applications in the pharmaceutical, food-safety, and environmental domains.

Original languageEnglish
Pages (from-to)1404-1418
JournalDrug Testing and Analysis
Issue number10
Early online date7 Jul 2020
Publication statusPublished - Oct 2020


  • cocaine
  • forensic illicit-drug analysis
  • indicative testing
  • k-nearest neighbors
  • near-infrared


Dive into the research topics of 'Rapid and robust on-scene detection of cocaine in street samples using a handheld near-infrared spectrometer and machine learning algorithms'. Together they form a unique fingerprint.

Cite this