The Foundation AI team helps the North Dakota Department of Corrections predict which inmates will be put in restrictive housing

Face Recognition - Video Tracking

Foundation AI is an Artificial Intelligence Solutions Provider. We help organizations process, manage, and leverage their unstructured data to automate labor-intensive tasks, make better data-driven decisions, and drive real business value.

Face Recognition - Object Tracking

North Dakota Department of Corrections provides prison services for the state of North Dakota. Their mission is to enhance public safety, to reduce the risk of future criminal behavior by holding adult and juvenile individuals accountable, and to provide opportunities for change. The department has been featured in podcasts and articles by NPR and Vox for their efforts to make their prison system more humane.

Object Tracking - AI


  • Video Object Tracking
    To predict, at the time of admission, the probability that an inmate would be put into administrative segregation (colloquially known as solitary confinement), so that the inmate could be targeted with positive interventions.

Distance Object Tracking


  • Tracking people Objects
    Sourced data from 2 data sources: the Offender Behavior database and Electronic Health Records.
  • Tracking Vehicles people
    Performed data imputation on missing data points using Random Forest Imputation.
  • Tracking
    Our prediction solution used an ensemble of multiple models: XGBoost and Random Forest.

Video Tracking


  • Object face Recognition
    Using data from 4,638 inmates, we were able to predict whether an inmate would be put into administrative segregation with 91.3% accuracy.


Incarcerated individuals are placed in a strict rules-based environment often because of their reluctance to follow rules. Many inmates with mental illnesses are unable to follow rules. Administrative segregation (colloquially known as solitary confinement) is used in correctional facilities to isolate inmates who disrupt the operations of the institution or are at risk of harming other inmates or staff. These inmates are isolated from the general population and have restrictions placed on their movement, behavior, and privileges. The use of administrative segregation has grown rapidly in the last 20 years.

While administrative segregation does isolate individuals, reducing the risk of harm to other inmates and staff, it does not improve behavior. It is well documented that inmates’ behavior and mental health deteriorate when they are placed in restrictive housing. In recent years, the political and legal pressure to minimize restrictive housing has increased substantially. Corrections institutions must find alternative ways of dealing with disruptive inmates that equally protect staff and other inmates. The push to decrease the use of restrictive housing, however, is largely an unfunded mandate.


Administrative segregation is expensive. Correctional facilities that successfully implement programming changes that decrease the population and length of stay in restrictive housing see decreased costs and improved mental health in their populations. The Department of Corrections in North Dakota approached Foundation AI to implement a system that would, at the time of admission, identify inmates at high risk of administrative segregation. With this information, the department will be able to target high risk individuals with positive interventions, reducing the probability that these individuals would need to be placed in restrictive housing.

Foundation AI’s objective was to build a model to predict the risk of administrative segregation (AS) at the time of imprisonment.


Data Used

Data from 2 different databases were gathered to predict the risk of AS:

  • Search Video

    Offender Behavior - Offender demographics, admissions, criminal history, incidents, living units, movements, offender programs, and reports.

  • Search Objects Vehicles

    Electronic Health Records - Data from the EHR system was used to correlate the offender’s behavior with Serious Mental Illnesses (SMI).


The 2 database systems contained both structured and unstructured information. The data was gathered and feature engineered to predict the risk of AS. The extracted dataset was split into 3 groups containing 70%, 10% and 20% of the data. The groups were used for training, validation, and testing respectively.

The parameters that were used included:

  • AI - Face Recognition

    Age at the time of admission

  • Tracking People Objects

    Previous restrictive housing information

  • Video Search Objects

    Criminal history

  • Video Intelligence

    First arrest age

  • video analysis

    Sentence duration

  • insights from video

    Offence type

  • AutoML


  • Object detection


  • analysis video

    Serious mental illness

  • AI - Face Recognition


  • Object detection

    Drug and alcohol history

  • Face Object detection

    Drug crime count

  • AI - video analysis

    Violent offence count

  • AI - Object detection

    Custody rating

  • Face Recognition

    Gang affiliation

The dataset was highly imbalanced with positive parameters comprising only 10% of the data points. SMOTE (Synthetic Minority Oversampling Technique) was used to counteract this imbalance. We performed data imputation on missing data points using techniques like KNN imputation, random forest imputation, and median value imputation. Random Forest-based imputation outperformed the other techniques and was used in the final model. We performed data normalization on numerical features and One Hot encoding was performed on categorical features.

Multiple models were built to predict the risk of Administrative Segregation, including XGBoost, Random Forest, and Logistic Regression. XGBoost outperformed other models for most of the data points. For some scenarios, the Random Forest-based model outperformed the other models. As a result, we used an ensemble of multiple models for the final solution.


Our model was trained and validated on data from 4,638 inmates from a single correctional facility. Future work needs to be done to see how the model performs when put into production at other facilities and if its findings can be generalized.

Overall Results:
  • Accuracy: 91.3%
  • ROC AUC: 0.934
  • Sensitivity: 0.821
  • Specificity: 0.916
Test Results:
  • Accuracy: 90.9%
  • ROC AUC: 0.901
  • Sensitivity: 0.818
  • Specificity: 0.903
Feature Importance:
Sample Correlation Plots:
If you are interested in deploying a solution built on our Extract Learning Platform, contact us to see what Foundation AI can do for you.
Artificial Intelligence for the Real World
© Foundation AI