Nearly 80% of accidents take place in year. Our app is going to help the users detect an accident and intimate hospitals that at this location accident has been done
You can install Conda
for python which resolves all the dependencies for machine learning:
pip install requirements.txt
- Run
create_dataset.py
for converting the video to images. - Then run
main.py
to train the model. - Finally, run
model.py
for testing your model.
The Algorithm: Each video is a set of individual images that are time-dependent sequences. The algorithm - a hierarchical recurrent neural network - is able to treat videos as a time-dependent sequence, yet it allows them to be an independent data point.
The algorithm uses two layers of long short-term memory neural networks. The first neural network (NN) is a recurrent network that analyzes the time-dependent sequence of the images within each video. The second takes the encoding of the first NN and builds a second NN that reflects which videos contain accidents and which do not. The resulting model enables a prediction of whether new dashcam footage will encounter an accident.
Through this method, the HRNN incorporates a time-dependent aspect of the frames within each video and predicts how likely it is that a new video contains a car accident.
- DEEP LEARNING
- MACHINE LEARNING
- ANDROID
- Kotlin
- CNN
- To provide early medical aid
- To tell the location of the accident
The app is made using Kotlin language. Various features are being added in the app such as alert system for an accident, sensors, etc. Try implementing this project and suggest changes:)
- Create an Android project
- [ X] Integrate ML model into app.
- [X ] Create an App Design.
- Add getUserlocation feature.
- Add option to add/edit/view emergency contacts.
- Fetch nearby hospital's information using Google Maps API.
- [X ] Use hardware sensors to detect motion of vehicle.
Feature | Description | Status |
---|---|---|
Predict accident | Predict accident prone areas using ML model | βοΈ |
Home Screen | Show User's location, SOS button, Show emergency contacts | β |
Before you begin, make sure you have the Android Studio SDK
downloaded and set up correctly. You can find a guide here: Setting up Android Studio
-
Download the Care4ther- project source either by forking and cloning the repository (recommended if you want to contribute) or by downloading it as a ZIP file and extracting it.
-
Open Android Studio, you will see a Welcome to Android window. Under Quick Start, select Import Project (Eclipse ADT, Gradle, etc.)
-
Navigate to the directory where you saved the Care4ther- project, select the "Care4ther-/Care4therApp" folder, and hit OK. Android Studio should now begin building the project with
Gradle
. -
Once this process is complete and Android Studio opens, check the Console for any build errors.
-
Once all build errors have been resolved, you should be all set to build the app and test it.
-
To Build the app, go to Build>Make Project (or alternatively press the Make Project icon in the toolbar).
-
After the app is built successfully, you can test it by running it on either a real device or an emulator by going to Run>Run 'app' or pressing the Run icon in the toolbar.
If you want to build apk only, go to Build>Build apk and apk would be build and directory where apk is generated would be prompted by Android Studio.
Please help us follow the best practices to make it easy for the reviewer as well as the contributor. We want to focus more on the quality of code than on managing pull request ethics.
- Single commit per pull request (So that commit history doesn't become messy)
- Reference the issue numbers in the commit message. Follow the pattern
Fixed #<issue number> <commit message>
- Follow uniform design practices. The design language must be consistent throughout the app.
- The pull request will not get merged until and unless the commits are squashed. In case there are multiple commits on the PR, the commit author needs to squash them and not the maintainers cherrypicking and merging squashes.
- If the PR is related to any front end change, please attach relevant screenshots in the pull request description.
As a tip for new developers those who struggle with squashing commits into one, multiple commits may appear in your pull request mostly due to following reasons.
- Intentionally adding multiple commit messages after each change without
git add
ing. - Updating the current branch with the remote so a merge commit takes place.
You can also follow this easy and helpful tutorial: How to squash commits Despite any reason, follow the steps given below to squash all commits into one adhering to our best practices.
- Setup remote to upstream branch if not set before :
$ git remote add upstream https://github.com/unnati914/Care4ther-.git
- Check into the branch related to the pull request :
$ git checkout <branch-name>
- Perform a soft reset to retain the changes while removing all the commit details :
$ git reset --soft upstream/main
- Add files to the staging area :
$ git add <file paths or "." to add everything>
- Create a new commit with a proper message following commit message guidelines :
$ git commit -m "tag: commit message"
- Push the required changes to your branch :
$ git push -f origin <branch-name>
Please try to follow the mentioned guidelines before submitting your code so that uniform code style is maintained in the project. It also makes it easier for the reviewer and other developers to understand.
- While naming the layout files, ensure that the convention followed is (activity/fragment) _ (name).xml like
activity_main.xml
,fragment_user_location.xml
. - The activity/fragment file name corresponding to the layout files should be named as (activity/fragment name)(activity/fragment).java like
UserLocationActivity.java
corresponding to the layout fileactivity_user_location.xml
,UserLocationFragment.java
corresponding to the layout filefragment_user_location.xml
. - Name the views and widgets defined in the layout files as (viewtype/widget) _ (name) _ (no. in the file if any) like
button_save
,editText_user_location
.
CCTV Camera pictures of accidents are being included.
- Hospital Integration
- New Datasets to be included in the model
Unnati Chhabra π Admin |
This project follows the MIT License.