Skip to content

Commit

Permalink
Updated licence and readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
slavajda02 committed May 26, 2024
1 parent a959600 commit 2647116
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 11 deletions.
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
55 changes: 44 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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.
Expand All @@ -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:

Expand All @@ -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
Expand All @@ -65,31 +76,48 @@ 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

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},
Expand All @@ -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}
}
```
File renamed without changes.

0 comments on commit 2647116

Please sign in to comment.