dima806 / crime_type_cctv_image_detection

huggingface.co
Total runs: 22
24-hour runs: 6
7-day runs: 8
30-day runs: 10
Model's Last Updated: December 16 2024
image-classification

Introduction of crime_type_cctv_image_detection

Model Details of crime_type_cctv_image_detection

Returns with about 22% accuracy the type of a crime seen in a CCTV camera image.

An example how to invoke this model together with the previous one for a given image:

# Import the 'pipeline' function from the 'transformers' library.
from transformers import pipeline

pipe1 = pipeline('image-classification', model="dima806/crime_cctv_image_detection", device=0)
pipe2 = pipeline('image-classification', model="dima806/crime_type_cctv_image_detection", device=0)

# Apply the 'pipe1' function to process the 'image' variable to see if there is a high probability for crime.
res1 = pipe1(image)
crime_score = [res['score'] for res in res1 if res['label']=='Crime'][0]
print(f"Crime score: {round(crime_score, 3)}" )
threshold = 0.5
if crime_score > threshold:
    # apply second pipeline to check the crime type
    print("There is a potential crime")
    res2 = pipe2(image)
    print("Top scores for crime types:")
    for res in res2:
        print(f"For {res['label']}: {round(res['score'], 3)}")

See https://www.kaggle.com/code/dima806/crime-types-cctv-detection-vit for more details.

image/png

Classification report:

               precision    recall  f1-score   support

        Abuse     0.0831    0.4411    0.1399       297
       Arrest     0.3701    0.2383    0.2899      3365
        Arson     0.2103    0.2707    0.2367      2793
      Assault     0.0135    0.0083    0.0103      2657
     Burglary     0.4341    0.2628    0.3274      7657
    Explosion     0.8575    0.1220    0.2136      6510
     Fighting     0.1200    0.4119    0.1858      1231
RoadAccidents     0.2454    0.6568    0.3573      2663
      Robbery     0.0170    0.2240    0.0316       835
     Shooting     0.4182    0.0706    0.1209      7630
  Shoplifting     0.9057    0.2457    0.3865      7623
     Stealing     0.1380    0.2198    0.1696      1984
    Vandalism     0.0980    0.2601    0.1423      1111

     accuracy                         0.2178     46356
    macro avg     0.3008    0.2640    0.2009     46356
 weighted avg     0.4766    0.2178    0.2410     46356

Runs of dima806 crime_type_cctv_image_detection on huggingface.co

22
Total runs
6
24-hour runs
6
3-day runs
8
7-day runs
10
30-day runs

More Information About crime_type_cctv_image_detection huggingface.co Model

More crime_type_cctv_image_detection license Visit here:

https://choosealicense.com/licenses/apache-2.0

crime_type_cctv_image_detection huggingface.co

crime_type_cctv_image_detection huggingface.co is an AI model on huggingface.co that provides crime_type_cctv_image_detection's model effect (), which can be used instantly with this dima806 crime_type_cctv_image_detection model. huggingface.co supports a free trial of the crime_type_cctv_image_detection model, and also provides paid use of the crime_type_cctv_image_detection. Support call crime_type_cctv_image_detection model through api, including Node.js, Python, http.

crime_type_cctv_image_detection huggingface.co Url

https://huggingface.co/dima806/crime_type_cctv_image_detection

dima806 crime_type_cctv_image_detection online free

crime_type_cctv_image_detection huggingface.co is an online trial and call api platform, which integrates crime_type_cctv_image_detection's modeling effects, including api services, and provides a free online trial of crime_type_cctv_image_detection, you can try crime_type_cctv_image_detection online for free by clicking the link below.

dima806 crime_type_cctv_image_detection online free url in huggingface.co:

https://huggingface.co/dima806/crime_type_cctv_image_detection

crime_type_cctv_image_detection install

crime_type_cctv_image_detection is an open source model from GitHub that offers a free installation service, and any user can find crime_type_cctv_image_detection on GitHub to install. At the same time, huggingface.co provides the effect of crime_type_cctv_image_detection install, users can directly use crime_type_cctv_image_detection installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

crime_type_cctv_image_detection install url in huggingface.co:

https://huggingface.co/dima806/crime_type_cctv_image_detection

Url of crime_type_cctv_image_detection

crime_type_cctv_image_detection huggingface.co Url

Provider of crime_type_cctv_image_detection huggingface.co

dima806
ORGANIZATIONS

Other API from dima806