Git repository for Sapa.AI (Bangkit Capstone Project by Neutr.AI (B21-CAP0093) Team.
The PPPA Ministry noted that in 2020 there were 4,116 cases of violence against women and children in Jakarta (a period of 7 months). Our independently conducted survey shows that almost 97 percent of the respondent doesn’t report the violence they have experienced or seen. However, the reporting system is still manual and not optimized. With SAPA AI there will be more and more ways available for victims to report cases of violence and make the process of handling reports more effective and efficient for the ministry of PPPA (Perlindungan Perempuan dan Anak) with the availability of additional features from SAPA AI. With the Deep Learning algorithm, we can create a reporting platform that directly classifies the types of violence experienced with the appropriate services. Through this initiative, we want to contribute to emancipated women and protect the future of our children.
- Upload your .pb Machine Learning Model into your Cloud Storage Bucket
- Set a Service Account for your Machine Learning Model
- Go to Google Cloud Platform -> Ai-Paltform -> Models
- Set your location and name of your model
- Create new version and costumize your container. For example we use this configuration:
- Set your autoscaling, machine-type, and service account. Example:
- Done
See our deploy.sh
file in our backend/main-cloud-run folder
You can pass these data into our forms/post endpoint
Data | Type | Description |
---|---|---|
"id_users" | String | User ID generated by Firebase Authentication |
"nama_korban_forms" | String | Name of Victim(s) |
"nama_tersangka_forms" | String | Name of suspect(s) |
"kronologi_forms" | String | Description of violence |
"flag_layanan1" | Boolean | User need service 1 |
"flag_layanan2" | Boolean | User need service 2 |
"flag_layanan3" | Boolean | User need service 3 |
"flag_layanan4" | Boolean | User need service 4 |
"flag_layanan5" | Boolean | User need service 5 |
"flag_layanan6" | Boolean | User need service 6 |
"flag_layanan7" | Boolean | User need service 7 |
"flag_layanan8" | Boolean | User need service 8 |
"foto_forms" | String | Photo(s) for evidences |
"lokasi_forms" | String | Violence loaction |
"upload_date_forms" | String | Upload form date |
The endpoint will return 201 Response Code if Succes with id_forms
Example request:
curl -X POST <your_API_url>/forms/post -H "Content-Type: application/json" --data '{"id_users":"2","nama_korban_forms":"Husni","nama_tersangka_forms":"Husni Naufal Zuhdi","kronologi_forms":"husni memukul husni yang sedang main FF","flag_layanan1":1,"flag_layanan2":1,"flag_layanan3":"","flag_layanan4":"","flag_layanan5":"","flag_layanan6":"","flag_layanan7":"","flag_layanan8":1,"foto_forms":"","lokasi_forms":"depan kosan Husni","upload_date_forms":"dua hari lalu"}'
You can pass these data into our call/post endpoint
Data | Type | Description |
---|---|---|
"id_users" | String | User ID generated by Firebase Authentication |
"record_call" | String | URI of the uploaded voice record |
"upload_date_forms" | String | Upload form date |
The endpoint will return 201 Response Code if Succes with id_call
and id_process
Example request:
curl -X POST <your_API_url>/call/post -H "Content-Type: application/json" --data '{"id_users":2,"record_call":"gs://sapaai-bucket/audio/test/test_3.mp3","upload_date_call":"dua hari lalu"}'
The application of Firebase in the application for login (authentification), account registration, and form (real-time), the application is connected to APIs from the cloud to then connect data from Android and stored in the database. The application can also save audio files to the Android internal storage, which can then be forwarded and managed by machine learning until it gets the desired classification.
You can see our Android development progress in android-development branch
we created the Indonesian reporting text dataset from the internet and we made our own survey to get an additional dataset for our machine learning model. After we preprocessing our data, then we apply to train a model to classify the reports into the Ministry of PPPA service classes. We split the dataset into train set and dev set to evaluate the model performance. We also tuned the hyperparameters to find the best-performing model. We made a function to get the desired results. Finally, we exported the best model in .pb format to be deployed in the Google Cloud Platform.
You can download our dataset in this link : https://www.kaggle.com/fafafwzn/indonesia-violence-reporting-text
Build a REST API for our android app with Google Cloud Run and build a Machine Learning Model with AI-Platform. We also use Speech-To-Text API to process the recorded voices into a text so our Machine Learning Model can ingest the voice-recorded reports.
This is our example for Speech to Text and Machine Learning model results
This project are part of capstone project for Bangkit 2021