Inspiration
Generative AI offers a plethora of benefits across various domains. Firstly, it enables the creation of realistic and diverse content, such as images, text, and music, which can be used for artistic expression, storytelling, and content generation at scale. Moreover, Generative AI facilitates innovation by automating tedious tasks, freeing up human creativity and time for higher-level problem-solving. Generative AI can personalize experiences and services, enhancing user engagement and satisfaction. Overall, its adaptability and potential for creativity and efficiency make Generative AI a powerful tool for diverse applications in today's digital age.
SuspectRecon stands for "Suspect Rconstruction". The inspiration behind building this application of generating suspect sketches or images using Generative AI technology stems from its potential to revolutionize traditional investigative methods. By leveraging Generative AI, law enforcement can drastically reduce the time required to obtain suspect sketches or images, expediting the identification process and aiding in swift apprehension. Moreover, this technology eases the burden on police forces by removing the dependency on skilled sketch artists, whose availability and accuracy may vary. Additionally, Generative AI allows for the generation of sketches multiple times with ease, enabling investigators to refine and adjust the depiction based on evolving witness descriptions or new evidence. Overall, harnessing Generative AI for suspect sketch generation represents a promising advancement in law enforcement techniques, enhancing efficiency, accuracy, and ultimately contributing to safer communities.
What it does
The creative assistant starts with an introduction as below -
👮♂️ LAPD Witness Interaction Bot 👮♀️ Hello and welcome to the LAPD Witness Interaction Bot. Thank you for coming forward with your valuable information regarding the criminal activity you witnessed. Your cooperation is crucial in helping us solve this case and bring the perpetrator to justice. To assist us further in our investigation, we'll be asking you a series of questions regarding the facial features of the suspect. Please choose the best possible options to describe the suspect to the best of your ability. Type Begin to start.
Upon the user (witness) initiating with "Begin," our creative assistant commences a series of inquiries to gather a detailed description of the suspect. The questions posed include:
- What is the suspect's gender? (a) Male (b) Female
- What is the overall shape of the suspect's face? (a) Oval (b) Round (c) Square (d) Heart-shaped (e) Diamond
- What is the texture of the suspect's hair? (a) Straight (b) Wavy (c) Curly (d) Coily
- What is the length of the suspect's hair? (a) Short (above shoulders) (b) Medium (shoulder length) (c) Long (below shoulders)
- What is the color of the suspect's hair? (a) Blonde (b) Brown (c) Black (d) Red (e) Grey
- What hairstyle does the suspect have? (a) Straight (b) Ponytail (c) Bun (d) Braids (e) Updo (f) Shaved/Buzzcut
- What is the color of the suspect's eyes? (a) Blue (b) Brown (c) Green (d) Hazel (e) Black
- What shape is the suspect's chin? (a) Round (b) Square (c) Pointed (d) Cleft
- What is the suspect's facial expression? (a) Smiling (b) Frowning (c) Neutral (d) Angry
- What ethnicity does the suspect appear to be? (a) Caucasian (b) African American (c) Hispanic (d) Asian (e) Other
- How old does the suspect appear to be? (a) Teenager (13-19) (b) 20s (c) 30s (d) 40s (e) 50+
- What is the suspect's skin complexion? (a) Fair (b) Medium (c) Olive (d) Dark
- Does the suspect have any distinguishing marks like scars, birthmarks, tattoos?
The witness must answer the questions by choosing the closest resembling option. As the witness responds to these questions, a summary of the description provided is compiled in the 'Portrait Prompt.'
Upon the completion of the last question, the creative assistant prompts the witness if there are any additions or corrections to be made to the description. If none, the witness is instructed to enter "Done." Subsequently, based on the final summary, AWS PartyRock generates a portrait of the potential suspect.
How we built it
The creative assistant was built by leveraging AWS PartyRock.
We created 3 widgets namely Chat, Portraint Prompt and Generated Portrait.
For the Chat widget -
We gave the prompt as below -
Assume the role of a police investigator tasked with creating a facial reconstruction of a suspect. As soon as the witness sends "Begin", start by asking the witness about the suspect's facial shape. Always provide the witness with 4-5 distinct choices and ask them to choose the choice number. Ask for specific features of the person, such as Gender, Face shape, Hair, Hair colour, Hair-style, Texture of hair, Eyes, Eye color, Eye shape, Chin, Expression, Ethnicity, Age, Skin complexion, Scars, Birthmarks, Freckles, Moles, Tattoos, Facial hair, Beard style, Mustache style, Stubble, Wrinkles, Lines, and any other relevant details. Dynamically adapt the questions based on the player's selections to ensure all aspects of a face are covered. After 15-20 questions, ask the user to type "Done" if the face looks correct and end the chat if they enter "Done".
For the Portrait Prompt -
We gave the prompt as below -
Generate a prompt for generating a photorealistic portrait of a person with the facial features that a user enters in: [Chat] . Keep on appending the new features to the previously entered features. The result should be a bulleted list with all the features and nothing else. Do not generate any default value.
We referenced the Chat widget in the Portrait Prompt widget to take the output of Chat widget as the input for Portrait prompt.
For both the above widgets, in Advanced settings we tried different values of 'Temperature' and 'Top P'.
For the Generated Portrait widget -
We gave the prompt as below -
A realistic picture of the human suspect who is described here: [Portrait Prompt].
We referenced the Portrait Prompt widget in the Generated Portrait widget to take the output of Portrait Prompt widget to generate the Portrait. For the above widget, in Advanced settings we tried different values of 'CFG scale' and 'Seed'.
Challenges we ran into
- Our primary challenge revolved around crafting effective prompts. We found ourselves revising the prompts several times to ensure they accurately captured the task of generating the suspect's image from the user inputs.
- Initially, we struggled with generating a concise bulleted summary of the user inputs. However, with the implementation of the correct prompts, we successfully resolved this issue.
- Additionally, we encountered instances where the model failed to produce relevant images. To address this, we experimented with different values of inference parameters such as temperature, Top-p, CFG scale, and seed.
Accomplishments that we're proud of
- We take pride in the journey we've undertaken to develop this application, from learning about Generative AI to mastering various features of AWS PartyRock.
- We believe our concept of reconstructing a suspect's image is inherently unique. We are convinced that its practical implementation could significantly streamline police operations, aligning with the original inspiration that motivated us to pursue this project.
What we learned
- We learned about various features of AWS PartyRock to develop our application, including widgets and their types, configuring widgets to meet our requirements, and the principles of prompt engineering.
- Consulting an article from Amazon Bedrock proved invaluable in understanding prompt engineering guidelines thoroughly. The article offered comprehensive details necessary for crafting effective prompts.
- Our prompts were carefully designed to offer clear direction and ensure a seamless user experience.
- In addition to conveying the task or instruction, we provided clear context to guide the LLMs more effectively.
What's next for SuspectRecon
- We aim to reconstruct crime scenes digitally based on available evidence, such as witness testimonies, surveillance footage, and forensic data.
- We will generate 3D models or simulations of crime scenes so that investigators can visualize and analyze the events more effectively, aiding in the identification of suspects and potential leads.
Built With
- amazon-web-services
- partyrock
Log in or sign up for Devpost to join the conversation.