{"id":26542811,"url":"https://github.com/sukhitashvili/violence-detection","last_synced_at":"2026-03-13T23:32:54.466Z","repository":{"id":53918197,"uuid":"413191310","full_name":"sukhitashvili/violence-detection","owner":"sukhitashvili","description":"Deep learning based algorithm which is capable of detecting violence in indoor or outdoor environments: fight, fire or car crash and even more","archived":false,"fork":false,"pushed_at":"2024-12-31T12:07:00.000Z","size":48415,"stargazers_count":80,"open_issues_count":0,"forks_count":24,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-20T00:06:42.624Z","etag":null,"topics":["car-accidents-detection","classification-model","deep-learning","fire-detection","violence-detection"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sukhitashvili.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-03T20:36:49.000Z","updated_at":"2025-05-14T01:47:07.000Z","dependencies_parsed_at":"2025-04-09T17:32:25.412Z","dependency_job_id":null,"html_url":"https://github.com/sukhitashvili/violence-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sukhitashvili/violence-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhitashvili%2Fviolence-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhitashvili%2Fviolence-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhitashvili%2Fviolence-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhitashvili%2Fviolence-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sukhitashvili","download_url":"https://codeload.github.com/sukhitashvili/violence-detection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhitashvili%2Fviolence-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30479380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T20:45:58.186Z","status":"ssl_error","status_checked_at":"2026-03-13T20:45:20.133Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["car-accidents-detection","classification-model","deep-learning","fire-detection","violence-detection"],"created_at":"2025-03-22T02:18:22.636Z","updated_at":"2026-03-13T23:32:54.459Z","avatar_url":"https://github.com/sukhitashvili.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Table of Contents\n\n[Introduction](#introduction)\n\n[How to Run](#howtorun)\n\n[Resutls](#results)\n\n[Further Work](#work)\n\u003ca name=\"introduction\"/\u003e\n\n# Introduction\n\nThis repo presents code for Deep Learning based algorithm for\n**detecting violence** in indoor or outdoor environments. The algorithm can\ndetect following scenarios with high accuracy: fight, fire, car crash and even\nmore.\n\nTo detect other scenarios you have to add **descriptive text label** of a\nscenario in `settings.yaml` file under `labels` key. At this moment model can\ndetect 16`+1` scenarios, where one is default `Unknown` label. You can change,\nadd or remove labels according to your use case. The model is trained on wide\nvariety of data. The task for the model at training was to predict similar\nvectors for image and text that describes well a scene on the image. Thus model\ncan generalize well on other scenarios too if you provide proper textual\ninformation about a scene of interest.\n\u003ca name=\"howtorun\"/\u003e\n\n# How to Run\n\nFirst install requirements:\n`pip install -r requirements.txt`\n\nTo test the model you can either run:\n`python run.py --image-path ./data/7.jpg`\n\nOr you can test it through web app:\n`streamlit run app.py`\n\nOr you can see the example code in `tutorial.ipynb` jupyter notebook\n\nOr incorporate this model in your project using this code:\n\n```python\nfrom model import Model\nimport cv2\n\nmodel = Model()\nimage = cv2.imread('./your_image.jpg')\nimage = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)\nlabel = model.predict(image=image)['label']\nprint('Image label is: ', label)\n```\n\n\u003ca name=\"results\"\u003e\u003c/a\u003e\n\n# Results\n\nBelow are the resulting videos and images. I used the model to make predictions\non each frame of the videos and print model's predictions on the left side of\nframe of saved videos. In case of images, titles are model's predictions. You\ncan find code that produces that result in `tutorial.ipynb` jupyter notebook.\n\n![Result video](./results/output_fire.gif)\n\n![Result video](./results/output_fight.gif)\n\n### Result Images\n\n![Result image](./results/3.jpg)\n![Result image](./results/9.jpg)\n![Result image](./results/2.jpg)\n![Result image](./results/4.jpg)\n![Result image](./results/10.jpg)\n![Result image](./results/7.jpg)\n![Result image](./results/0.jpg)\n\n\u003ca name=\"work\"\u003e\u003c/a\u003e\n\n# Further Work\n\nNeeds further work for enhancements like: Batch processing support for speedup, return of\nmultiple suggestions, threshold fine-tuning for specific data, ect.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukhitashvili%2Fviolence-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsukhitashvili%2Fviolence-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukhitashvili%2Fviolence-detection/lists"}