Inspiration

We wanted to bring fairer trials to those who may not be able to afford the most expensive legal support. AI has great advantages in performing complex tasks quickly and objectively, and we wanted to harness this technology to defend the integrity of the judiciary and legal system against those who attempt perjury.

What it does

Our system is an advanced behavior detector that identifies potentially fraudulent statements and suspicious physical movements in real-time. These indicators can involve aggressive blinking, inconsistent eye movements, and testimonies that don't align with the given evidence. The AI analyzes these factors simultaneously to flag potential dishonesty.

How we built it

We utilized the PyTorch deep learning framework to process our custom datasets and create a robust pipeline to a fine-tuned Hugging Face language model (LLM). This LLM was specifically trained to detect deceptive language patterns. The project's architecture consists of Python Flask for the backend API and React for the responsive frontend user interface. We integrated a live camera feed using react-camera and leveraged AWS Transcribe for real-time, highly accurate speech-to-text conversion.

Challenges we ran into

Developing a custom dataset relating to criminal cases proved ethically challenging, as many available chatbots like ChatGPT and Gemini flagged our queries for potentially unethical content when probing certain violent areas. We devised a workaround by carefully rephrasing our dataset to be more PG-13 while retaining the essential information. Additionally, we opted for the Mistral open-source model, which offered more flexibility in handling sensitive language without compromising the integrity of our data. The integration of frontend and backend components presented significant technical hurdles. We encountered a progression of HTTP errors (403, 404, 500) during development, necessitating extensive debugging. A particularly complex challenge arose from the need to synchronously transmit frontend camera and microphone data to the backend for real-time processing, then return the analysis results promptly for display.

Accomplishments that we're proud of

We successfully implemented AWS Transcribe and developed sophisticated server-side logic to seamlessly connect our Flask backend with the React frontend. This involved efficiently chunking audio segments and transmitting data through web sockets for low-latency communication. Our facial recognition model now accurately detects subtle microexpressions, displaying the analysis results live on the website interface.

What we learned

We gained valuable experience in fine-tuning a Large Language Model (LLM) using a specialized custom dataset. This process involved processing and analyzing a high volume of tokens extracted from diverse evidence and testimonial files, significantly enhancing the model's ability to discern truthful from deceptive statements in a legal context.

What's next for Criminality

To further enhance our system's accuracy, we plan to incorporate additional physiological indicators of deception. This includes developing capabilities to detect forehead perspiration, vocal stress analysis, and subtle changes in skin tone that may indicate dishonesty. We also aim to expand our training dataset and refine our AI models to improve overall performance across a wider range of scenarios and demographics.

Built With

Share this project:

Updates