YOLO Lab - an intoductory application to the YOLO library
Y-Lab is an application to introduce you the capabilities of YOLO library. The interface will show how the library works or at least, how car objects are detected from images.
- Download the Anaconda installer for Python 3.x from the Anaconda download page.
- In Windows run the installer by double-clicking the downloaded file. In Linux install by typing:
# in terminal window, where [Anaconda-latest-Linux-x86_64.sh] is the name of downloaded file
bash [Anaconda-latest-Linux-x86_64.sh]
- Create a new Conda environment by typing:
# in the Anaconda Prompt, where [env_name] is the name of the specified environment
conda create -n [env_name] python=3.5
- Activate the virtual environment by typing:
# in Windows
activate [env_name]
# in Linux
# in Anaconda Prompt, where [env_name] is the name of the specified environment
source activate [env_name]
- Install numpy by typing:
pip install numpy
- Install pandas by typing:
pip install pandas
- Install cython by typing:
pip install cython
- Install OpenCV for Python by typing:
pip install opencv\-python
- Type:
python \-m pip install tensorflow
Alternatively to install the GPU package which requires a CUDA®-enabled GPU card, run:
python \-m pip install tensorflow\-gpu
- In Windows, install Git by downloading git, and double-clicking on the downloaded file. In Linux, install Git by typing:
# in the terminal window
apt-get install git
- Clone the Darkflow repo by typing:
git clone https://github.com/thtrieu/darkflow.git
- Type:
cd darkflow
- Install Darkflow globally by typing:
pip install .
- Download Node.js and install it
- Open the Node.js command prompt and install Electron by typing:
npm install -g electron
- Clone the repo by typing:
git clone https://github.com/log-basee/y-lab.git
Download the repo if you can't clone it and extract the file 2. Enter the folder directory by typing:
# if you downloaded the repo
cd y-lab/master
# or
cd y-lab
- Install the dependencies by typing:
npm install
- Run the app by typing:
npm start
# or
electron
Due to the fact that the application is running offline, there is only one user access without any significant restrictions.
To access the system, the user only needs to open the application without any login procedures needed because the application is running offline in the user’s desktop without affecting the application itself.
When opening the application, the user will be directed to the index screen. At the index screen, apart from setting other configurations, the user will also be given the choice to select either the video detection mode or vehicle counting mode, which works as follows:
-
Video Detection
The video detection mode detects objects in the input video and highlights them with bounding boxes. The objects to be detected can be further specified by the user. -
Vehicle Counting
The vehicle counting mode, apart from detecting objects (specifically cars and trucks), calculates the number of vehicles (limited to cars and trucks) which passes the counting line located in the middle of the region of interest.
After finishing the configuration, the user will be directed to the progress screen to show progress of the video processing. When the process finished, user will be directed to the result screen and the application will show the result of the process. On this screen, the user is given the option to restart the process with a new video.
To exit the system, the user only needs to close the application and provides a confirmation for the system. If the application is in the middle of processing video, the application will show a warning and ask for user’s confirmation to stop all process. On the other hand, if the application has any unsaved output or settings, the application will give the option to save before exiting the application or just immediately close the application.
- File path: this will show the file path of the video you chose. You can choose a video by clicking the ‘Browse’ button
- Object detection type: you can either choose the default object detection, or traffic detection.
- File details: if you have chosen a video file, its details will appear here.
- Region of interest (ROI): specify which part of the video you want to process. Regions outside the ROI will be ignored
- Neural network model: specify the neural network model you are going to use. If you don’t know what you’re doing, the default one will suffice.
- Weights: specify the weights of the neural network to be used. If you don’t know what you’re doing, the default one will suffice.
- Threshold: objects are detected with a certain confidence ranging from 0 to 1. If the confidence is below the threshold, it will be ignored, and vice versa. You can choose the default one, or customize it yourself.
- GPU use: to speed up the object detection process, your GPU will be used. You can specify how much GPU should be used for the program. WARNING: setting it to the max may cause other programs to crash.
- Object filter: you can filter out which objects should be detected from the video.
- ‘Looks good!’: Once everything is done, you can press this button for the video to be processed.
- ‘Save options’: You can save the configuration you made to an external .json file.
- Video controls: you can preview the video you have chosen and control with the usual video controls.
- ‘Continue’: if the process is done, press this to move on to view the results.
- ‘Cancel’: cancel the process at any time.
- Result: shows the results processed from the video.
- Video details: shows the details of the result video.
- ‘Try again’: restarts the app from the beginning, so you can experiment with other settings.
- ‘Save video’: saves the result video to an external .mp4 file
- Video controls: controls the result video preview.
This function enables users to detect objects from video.
Step 1: Click on ‘browse’ button (1) to choose a video
Step 1a (optional): If desired, customize the settings (4-9) for the object detection engine.
Step 2: Press ‘looks good’ (1) to start the object detection process. Press ‘go!’ on the confirmation dialog.
Step 3: A process screen like below should appear. Wait until the progress bar is full.
Step 4: Once it’s done, press the ‘continue’ button (1).
Step 5: A result screen like the image above should appear. If you wish to restart the process, press ‘try again’ (3) and repeat from step 1.
The errors the user might encounter in this application are:
- node-gyp build error
- Description: This can occur for Windows users.
- Fix: run the following command:
npm install --global windows-build-tools
-
tensorflow: CUDA library not found
- Description: This occurs when CUDA is not installed properly
- Fix: make sure CUDA v9.0 is installed in your system, and is available in the PATH variable. You can refer here for the complete instructions.
-
OpenCV: missing dll, unsupported video codec
- Description: this might happen when rendering the result video.
- Fix: download the .dll file from here, and put it in your PATH variable
Should any errors/bugs, questions, or support is needed, please open an issue at http://github.com/Log-baseE/Y-LAB/issues.
- Click the "New Issue" button
- Provide the name of the issue in the Title field
- Provide a detailed information regarding the issue in the which may include but not limited to:
- Snippets of the issue
- Description regarding the event preceding the issue
- Add labels regarding the issue
- Submit the issue and wait for the development team to reach back
This project is licensed under the MIT License - see the LICENSE file for details