From 2647116034f64a7d29cb84b77f77812fe4c48543 Mon Sep 17 00:00:00 2001 From: slavajda02 Date: Sun, 26 May 2024 03:26:12 +0200 Subject: [PATCH] Updated licence and readme.md --- LICENSE | 1 + README.md | 55 +++++++++++++++++++++++++++++-------- README_old.md => README.old | 0 3 files changed, 45 insertions(+), 11 deletions(-) rename README_old.md => README.old (100%) diff --git a/LICENSE b/LICENSE index 19e8fee..6080ff0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License Copyright (c) 2023 Porvatov Vadim +Copyright (c) 2024 Miloslav Kužela Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index dc13f42..eb46625 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ # Detection of parking space availability based on video This is a repo that contains the scripts for *''Detection of parking space availability based on video''* thesis and bachelor work. +## This repo now consists of two parts! +1. **Model training and testing scripts and tools** + - Contains tools to create your own dataset, train your selected network and run tests. +2. **Flask WebServer application for occupancy detection** + - Consists of a web application using ArgonPark library to evaluate free parking spaces on a parking lot + + +## Introduction + This repo originated as a fork of a repository from [*''Revising deep learning methods in parking lot occupancy detection''*](https://arxiv.org/abs/2306.04288). I greatly thank the authors for their work. And I recommend checking the repository along with their paper, their reasearch helped me significantly. The authors are: @@ -10,9 +19,8 @@ And their repo is: [parking-reseach](https://github.com/Eighonet/parking-researc The original goal of this fork is to port the tools to newest python libraries and to serve as a personal playground for the work. But after a lot of changes and modifications to the code. It is now used as a proof of concept to the final work. -The training and testing scripts support only a object recognition models for now. - -Scripts will work with datasets used in Parking-Research +The training and testing scripts support only object recognition models for now. +Scripts will work with datasets used in Parking-Research as they use the same format. ## What has been added / changed - I written a training script that lets the user choose how to train a model with the dataset format from their work as both as a training script that uses the testing images from the dataset to test the trained model. @@ -25,7 +33,8 @@ Scripts will work with datasets used in Parking-Research ## Downloads [Images containing testing results with trained models and T10LOT dataset](https://drive.google.com/drive/folders/1Jvvc7PKZTQi63PJnOjMKW9x3qeNipSYl?usp=drive_link) -# Prerequisites + +## Prerequisites To run the code, you need to install the requirements using the following command: @@ -43,7 +52,9 @@ conda activate parking-research The trainig script is setup to log information to [Comet](https://comet.com). The training script looks for an `pi.key`` file containing a key that you can obtain in your user settings after registering. -# Training + +# Part one: **Models/~** +## Training Create a `datasets` directory containing the datasets in the same location as the training script. Add an `api.key` file containing your comet API key next to your `datasets` folder. Then run the script and follow to onscreen prompts: ```bash python train.py @@ -65,22 +76,41 @@ settings = { } ``` -# Running tests +## Running tests After training a model you can test it using the `test.py` script. Run it and follow the prompts: ```bash python test.py ``` The testing function can print out the time of one inference and save all of the images that were tested. -# ArgonPark library + +# Part two: **rPi_host/~** + +## ArgonPark library This library was made to utilize the trained model from previous steps with an algorithm to evaluate occupancy on a dedicated parking lot. It acts as a base for a raspberry pi host script that has a web interface which interfaces with this library and its methods. -Documentation is in the works. +[Documentation](https://slavajda02.github.io/parking-research-argon/) for this library is available on githubs pages. + +## Webserver +### How to: +1. cd into the ```rPi_host/webServer``` directory +2. populate the ```upload/``` directory with ```state_dict_final.pth``` obtained from the training script +3. run: + +```bash +python server.py +``` + +This should launch a developement webserver running on an ip adress that will be printed out into the terminal. The home page should show the current raspberry Pi camera view with plotted parking spaces. +To create a new map, head to Tools->Map, download the raw image and use the jupyter script in ```app/ArgonPark/map_Creator``` to create a new ```map.json``` which can then be uploaded straight from the site. After the upload, images should refresh with the upated information. + +## Database setup +The subprocess of this application sends the curent status of all parking space alongside with aditional information to a MongoDB database configured in the ```___init___.py```. Which is now connecting to an Atlas service. You can reconfigure the database to connect to. # Contact me -If you have some questions about the code, you are welcome to open an issue or contact me through an email. Please do not contact the original authors with questions regarding this fork. +If you have some questions about the code, you are welcome to open an issue or contact me through an email or through social link on my GitHub profile. Please do not contact the original authors with questions regarding this fork. # License @@ -88,8 +118,6 @@ Established code released as open-source software under the MIT license. # Citation -To be updated. - ``` @misc{martynova2023revising, title={Revising deep learning methods in parking lot occupancy detection}, @@ -99,4 +127,9 @@ To be updated. archivePrefix={arXiv}, primaryClass={cs.LG} } +@misc{kuzelaParkDetection, + title={Detection of parking space availability based on video}, + author={Miloslav Kužela and Tomáš Frýza} + year={2024} +} ``` diff --git a/README_old.md b/README.old similarity index 100% rename from README_old.md rename to README.old