{"id":19832024,"url":"https://github.com/danielmartensson/camera-reporter","last_synced_at":"2025-02-28T17:45:40.293Z","repository":{"id":120604026,"uuid":"291754042","full_name":"DanielMartensson/Camera-Reporter","owner":"DanielMartensson","description":"Camera reporter with mail feature. This project uses the Darknet library for identify objects. It also uses Spring Boot to handle the web service and mail","archived":false,"fork":false,"pushed_at":"2021-06-23T10:56:33.000Z","size":91305,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T10:19:35.968Z","etag":null,"topics":["darknet","java","yolo"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DanielMartensson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-08-31T15:32:30.000Z","updated_at":"2024-12-04T17:51:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9c25217-c016-46f8-a1b5-362c72bb924d","html_url":"https://github.com/DanielMartensson/Camera-Reporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartensson%2FCamera-Reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartensson%2FCamera-Reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartensson%2FCamera-Reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartensson%2FCamera-Reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielMartensson","download_url":"https://codeload.github.com/DanielMartensson/Camera-Reporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241191626,"owners_count":19925302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["darknet","java","yolo"],"created_at":"2024-11-12T11:36:00.448Z","updated_at":"2025-02-28T17:45:40.287Z","avatar_url":"https://github.com/DanielMartensson.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Camera Reporter\n\nThis projects handels intelligent monitoring. It uses Darknet AI to classify objects from a USB camera picture, or embedded web cam inside a laptop.\nIf a object is identified, then this web application and send a mail e.g alarm mail with a message to a specific user. Very usefull if you want to have \na specific alarm and not just a regular alarm. \n\nUse this software if you want handel intelligent monitoring for security.\n\n# Features\n\n- Mail service\n- Object identification\n- Mobile and tablet suitable\n- Login screen with password requirement\n- Database storage for emails and messages\n\n# Pictures\n\nMy desktop with a poor old Dell Precision M6400 from 2007. Yes, it works but it's about 2 seconds delay per image for `Yolov4-tiny` model.\n\n![a](https://raw.githubusercontent.com/DanielMartensson/Camera-Reporter/master/Pictures/Screenshot.png)\n\n\nMail configuration and message\n\n![a](https://raw.githubusercontent.com/DanielMartensson/Camera-Reporter/master/Pictures/MailConfig.png)\n\nDarknet files upload\n\n![a](https://raw.githubusercontent.com/DanielMartensson/Camera-Reporter/master/Pictures/DarknetUpload.png)\n\n# How to install - Ubuntu user\n\n1. Install Java 11, Maven, NodeJS\n\nJava 11\n```\nsudo apt-get install openjdk-11-jdk\n```\n\nMaven\n```\nsudo apt-get install maven\n```\n\nNodeJS - This is used if you want to work on this project. If you only want to run this project, you don't need NodeJS.\n```\ncurl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -\nsudo apt-get install -y nodejs\n```\n\n2. Begin first to install MySQL Community Server\n\n```\nsudo apt-get install mysql-server\n```\n\n\n3. Then create a user e.g `myUser` with the password e.g `myPassword`\n\nLogin and enter your `sudo` password or mysql `root` password\n```\nsudo mysql -u root -p\n```\n\nCreate user with the host `%` \u003c-- That's important if you want to access your server from other computers.\n```\nCREATE USER 'myUser'@'%' IDENTIFIED BY 'myPassword';\n```\n\nSet the privileges to that user\n```\nGRANT ALL PRIVILEGES ON *.* TO 'myUser'@'%';\n```\n\n4. Change your MySQL server so you listening to your LAN address\n\nOpen this file\n```\n/etc/mysql/mysql.conf.d/mysqld.conf\n```\n\nAnd change this\n```\nbind-address            = 127.0.0.1\n```\n\nTo your LAN address where the server is installed on e.g\n```\nbind-address            = 192.168.1.34\n```\n\nThen restart your MySQL server\n```\nsudo /etc/init.d/mysql restart\n```\n\nIf you don't know your LAN address, you can type in this command in linux `ifconfig` in the terminal\n\n5. Create a Gmail account\n\nCreate a Gmail account and go to `https://myaccount.google.com/security` and enable so you can login from `less secure apps`.\nBecause `Camera-Reporter` uses `Java Mail` to logg into Gmail. This feature exist because if `Camera-Reporter` is on the fly over a\nnight and something happens, then it will stop everything and send a message back to you.\n\n\n6. Create Ramdisk for `Darknet` folder\n\nWe need to save our prediction pictures and camera pictures here on RAM memory so we won't harm the harddrive.\nCreate a 200 megabyte Ramdisk for two pictures if you using `Yolo V4 Tiny`. When applied `Yolo V4 Tiny`, then you will have about 80 megabytes left.\nEvery time you stard the prediction, then this `Camera-Reporter` will copy `Darknet` folder to `/mnt/ramdisk`\n\nDo the following:\n```\nsudo mkdir /mnt/ramdisk\nsudo mount -t tmpfs -o rw,size=200M tmpfs /mnt/ramdisk\ndf -h\n```\nAdd a Ramdisk automatically at startup\nWrite\n```\nsudo nano /etc/fstab\n```\n\nThen paste this line at the bottom\n```\ntmpfs  /mnt/ramdisk  tmpfs  rw,size=200M  0   0\n```\n\nNow press `Ctrl\u003e + X` and then press `y` and then press `Enter` to save the file.\n\nIf you want to unmount `ramdisk` folder\n\n```\nsudo umount /mnt/ramdisk\n```\n\n7. Download `Camera-Reporter`\n\nDownload the `Camera-Reporter` and change the `application.properties` in the `/src/main/resources` folder.\nHere you can set the configuration for your database LAN address, user and password. You can also set a gmail address and its\npassword. \n\n```\n# Database\nspring.jpa.show-sql=true\nspring.jpa.hibernate.ddl-auto=update\nspring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect\nspring.datasource.url=jdbc:mysql://yourServerIP:3306/CameraReporter?createDatabaseIfNotExist=true\u0026serverTimezone=CET\nspring.datasource.username=myUser\nspring.datasource.password=myPassword\n\n#Upload\nspring.servlet.multipart.max-file-size=500MB\nspring.servlet.multipart.max-request-size=500MB\n\n# Mail - Transmitter\nmail.host=smtp.gmail.com\nmail.port=587\nmail.username=yourGMailAddress@gmail.com\nmail.password=yourGMailPassword\nmail.properties.mail.smtp.auth=true\nmail.properties.mail.smtp.starttls.enable=true\n\n# Mail - Reciever\nmail.subject = Camera Detection\n\n# Login\nspring.security.user.name=myUser\nspring.security.user.password=myPassword\n```\n\n8. Run the project\n\nStand inside of the folder `Camera-Reporter` and write inside your terminal\n```\nmvn spring-boot:run -Pproduction\n```\nNow you can go to your web browser and type in the local IP address of the computer there you started this application.\n\n9. Upload Darknet files\n\nGo to https://github.com/AlexeyAB/darknet and download the sourcecode and follow the instructions how to compile under Linux. Then upload the `darknet`, `.data`, `.cfg`, `.weights`, `.names` files etc. to the `Darknet` folder inside this project. \nThere is a `YOLO 4 Tiny` already included so you can if you want just try this first and see if you get predictions before you doing it any more.\nNotice that this `darknet` file included in this project is compiled under Lubuntu Linux 18.04 on a Dell Precision M6400 computer. It has no `GPU`, `CUDA`, `OPENCV`. Just default settings. You don't need OpenCV because this `Darknet` won't show the predictions.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmartensson%2Fcamera-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielmartensson%2Fcamera-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmartensson%2Fcamera-reporter/lists"}