Skip to content

Commit

Permalink
V1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Joinn99 committed Feb 23, 2019
0 parents commit e4cc3b2
Show file tree
Hide file tree
Showing 89 changed files with 9,794 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.dll
*.dylib

# Qt-es
object_script.*.Release
object_script.*.Debug
*_plugin_import.cpp
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
*.qmlc
*.jsc
Makefile*
*build-*

# Qt unit tests
target_wrapper.*

# QtCreator
*.autosave

# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*

# QtCreator CMake
CMakeLists.txt.user*
33 changes: 33 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Kirin Label Assistant
# CMakeLists.txt

cmake_minimum_required(VERSION 3.1.0)

project(KirinLabelAssistant)

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)

find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(OpenCV 3.4.0 REQUIRED)

include_directories(${CMAKE_SOURCE_DIR}/src)

file(GLOB KirinLabelAssistant_SRC ${CMAKE_SOURCE_DIR}/src/*)
file(GLOB KirinLabelAssistant_UI ${CMAKE_SOURCE_DIR}/ui/*)
set(KirinLabelAssistant_ICON ${CMAKE_SOURCE_DIR}/resource/icon.rc)

qt5_wrap_ui(KirinLabelAssistant_UI_N ${KirinLabelAssistant_UI})
qt5_add_resources(KirinLabelAssistant_QRC ${CMAKE_SOURCE_DIR}/resource/kirinresource.qrc)

add_executable(${PROJECT_NAME}
${KirinLabelAssistant_SRC}
${KirinLabelAssistant_UI_N}
${KirinLabelAssistant_QRC}
${KirinLabelAssistant_ICON})

target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Widgets ${OpenCV_LIBS})

Set_Target_Properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<img src="https://raw.githubusercontent.com/Joinn99/RepositoryResource/master/KLA/icon.png" width=96 height=96 />

# Kirin Label Assistant
### A scene text detection label helper

![GitHub](https://img.shields.io/github/license/Joinn99/KirinLabelAssistant.svg?label=License) ![GitHub repo size in bytes](https://img.shields.io/github/repo-size/Joinn99/KirinLabelAssistant.svg) ![OpenCV](https://img.shields.io/badge/OpenCV-4.0.1-red.svg) ![Qt](https://img.shields.io/badge/Qt-5.11.2-brightgreen.svg)
---
Kirin Label Assistant is a deskop cumputer program which helps creating training set for scene text detection. Users can use the program to label their own images efficiently with the help of the automatic label function, which using [EAST](https://arxiv.org/abs/1704.03155v2) neural network to generate labels automatically. Users only need to correct model's wrong label results.

It is programmed in C++ with [Qt](https://www.qt.io/) framework. The EAST model applied in the program by using [OpenCV](https://opencv.org/) Library.

## Features
The program has two mode: File mode and Camera mode. You can choose the mode when you open the program, or change it any time.
![main](https://raw.githubusercontent.com/Joinn99/RepositoryResource/master/KLA/main.jpg)
When you run the program for the first time, you need to set the EAST model path. This project does not include the model. You can download it on [Google Drive](https://drive.google.com/open?id=14quvrzJ211VePBqFO0oc6vSj5Lg6nAqM) or [BaiduYun](https://pan.baidu.com/s/19BXxaF5WaJLmLrIBMVxkPw), or use your own EAST model.
### File Mode
In file mode, first you should choose a directory which contains several images(support *.jpg, *.png, *.bmp). You will see all images name in the list. If there is a *.txt file has the same name with a image, it will be marked as "Labeled".

Click an image and it will show in the center zone. If it is labeled, KLA will load the label file, or it will generate labels using EAST model.
![label](https://raw.githubusercontent.com/Joinn99/RepositoryResource/master/KLA/label.jpg)
The label rectangle will show on the image, their coordinate will list right. You can drag the rectangle to move it, or drag the corner to reshape. You can save the label by clicking "Kirin Label!" or pressing SPACE.
### Camera Mode
In camera mode, program will use webcam to capture the image and do real-time text detection. You can save the image with label files.
![camera](https://raw.githubusercontent.com/Joinn99/RepositoryResource/master/KLA/camera.jpg)
In both two modes, you can set EAST model parameters. **Input Size** will influence the model's detection speed and precision. **EAST Thershold** and **NMS Thershold** influence the precision.
![set](https://raw.githubusercontent.com/Joinn99/RepositoryResource/master/KLA/set.jpg)
#### Language
This program support English and Simplified Chinese, you can set the language by modifing ```KirinSettings.ini```
```
language=en #English
language=ch_zn #Simplified Chinese
```
## Compiling the project
The project is a C++ project, you can cuild the project using [CMake](https://cmake.org/) and then compile and run it when you solve the dependencies problems.
### Dependencies
KLA needs two main dependencies: OpenCV and Qt Frameforks. You have to make sure these two dependencies are installed correctly on your system. You can compile the project on Linux, Windows and MacOS.
### Versions
+ **Qt:** 5.11.2(Recommanded) 5.4.0(Minimum)
+ **OpenCV:** 4.0.1(Recommanded) 3.4.0(Minimum)
### Compiling on Windows
+Installing Qt: Compiling the program only need **Qt5Core.dll** and **Qt5Widget.dll**, make sure they are included in your PATH.

+Installing OpenCV: If you haven't install OpenCV, follow this [page](https://docs.opencv.org/4.0.1/d3/d52/tutorial_windows_install.html) to install it.

Build the project using ```cmake``` or ```cmake-gui``` in ```<KirinLabelAssistant>/build``` directory. If you use ```NMake Makefiles``` as generator, you can compile it with ```nmake``` and find the program in ```<KirinLabelAssistant>/bin```.
### Compiling on Linux
+Installing Qt: **Qt5Core.dll** and **Qt5Widget.dll** are included in ```Qtbase5-dev```.Install it with
```
sudo apt-get install qtbase5-dev
```
+Installing OpenCV: KLA uses dnn module in ```opencv_contrib```, which is not available in ```libopencv-dev```. This means you have to compile the OpenCV librarys by yourself. Following [this](https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html) to compile and install OpenCV plus **OpenCV contrib**.

Once you finish these two dependencies installation, you can compile the project with
```
$ cd <KirinLabelAssistant>/build>
$ cmake ..
$ make
```
And run the program with
```
$ cd <KirinLabelAssistant>/bin>
$ ./KirinLabelAssistant
```
## License
Kirin Label Assistant uses GNU GPL v3.0 License.
Icons are from [Google Material Design Icons](https://github.com/google/material-design-icons) and [iconshock](https://www.iconshock.com/).
1 change: 1 addition & 0 deletions resource/icon.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "icons/app.ico"
Binary file added resource/icons/Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/app.ico
Binary file not shown.
Binary file added resource/icons/arrow-down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/arrow-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/arrow-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/camera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/checkmark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/cross.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/east.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_camera_alt_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_camera_alt_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_clear_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_clear_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_close_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_crop_7_5_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_crop_square_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_delete_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_delete_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_fast_forward_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_fast_forward_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_fast_rewind_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_fast_rewind_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/icons/ic_folder_black_24dp.png
Binary file added resource/icons/ic_folder_open_black_24dp.png
Binary file added resource/icons/ic_folder_open_white_24dp.png
Binary file added resource/icons/ic_folder_white_24dp.png
Binary file added resource/icons/ic_image_black_24dp.png
Binary file added resource/icons/ic_image_white_24dp.png
Binary file added resource/icons/ic_info_outline_white_24dp.png
Binary file added resource/icons/ic_library_add_black_24dp.png
Binary file added resource/icons/ic_library_add_white_24dp.png
Binary file added resource/icons/ic_navigate_before_black_48dp.png
Binary file added resource/icons/ic_navigate_before_white_48dp.png
Binary file added resource/icons/ic_navigate_next_black_48dp.png
Binary file added resource/icons/ic_navigate_next_white_48dp.png
Binary file added resource/icons/ic_palette_white_24dp.png
Binary file added resource/icons/ic_remove_white_24dp.png
Binary file added resource/icons/ic_save_black_24dp.png
Binary file added resource/icons/ic_save_white_24dp.png
Binary file added resource/icons/ic_settings_black_24dp.png
Binary file added resource/icons/ic_settings_overscan_black_24dp.png
Binary file added resource/icons/ic_settings_overscan_white_24dp.png
Binary file added resource/icons/ic_settings_white_24dp.png
Binary file added resource/icons/ic_update_black_24dp.png
Binary file added resource/icons/ic_update_white_24dp.png
Binary file added resource/icons/ic_zoom_in_black_24dp.png
Binary file added resource/icons/ic_zoom_in_white_24dp.png
Binary file added resource/icons/ic_zoom_out_black_24dp.png
Binary file added resource/icons/ic_zoom_out_white_24dp.png
Binary file added resource/icons/icon.png
Binary file added resource/icons/kIRIN.png
Binary file added resource/icons/webcam.png
Binary file added resource/images/KirinBackground.png
75 changes: 75 additions & 0 deletions resource/kirinresource.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<RCC>
<qresource prefix="/icons">
<file>icons/ic_folder_open_white_24dp.png</file>
<file>icons/ic_folder_open_black_24dp.png</file>
<file>icons/ic_camera_alt_black_24dp.png</file>
<file>icons/ic_camera_alt_white_24dp.png</file>
<file>icons/ic_clear_black_24dp.png</file>
<file>icons/ic_clear_white_24dp.png</file>
<file>icons/ic_delete_black_24dp.png</file>
<file>icons/ic_delete_white_24dp.png</file>
<file>icons/ic_fast_forward_black_24dp.png</file>
<file>icons/ic_fast_forward_white_24dp.png</file>
<file>icons/ic_fast_rewind_black_24dp.png</file>
<file>icons/ic_fast_rewind_white_24dp.png</file>
<file>icons/ic_image_black_24dp.png</file>
<file>icons/ic_image_white_24dp.png</file>
<file>icons/ic_save_black_24dp.png</file>
<file>icons/ic_save_white_24dp.png</file>
<file>icons/ic_settings_black_24dp.png</file>
<file>icons/ic_settings_overscan_black_24dp.png</file>
<file>icons/ic_settings_overscan_white_24dp.png</file>
<file>icons/ic_settings_white_24dp.png</file>
<file>icons/ic_update_black_24dp.png</file>
<file>icons/ic_update_white_24dp.png</file>
<file>icons/ic_zoom_in_black_24dp.png</file>
<file>icons/ic_zoom_in_white_24dp.png</file>
<file>icons/ic_zoom_out_black_24dp.png</file>
<file>icons/ic_zoom_out_white_24dp.png</file>
<file>icons/ic_library_add_black_24dp.png</file>
<file>icons/ic_library_add_white_24dp.png</file>
<file>icons/file.png</file>
<file>icons/webcam.png</file>
<file>icons/camera.png</file>
<file>icons/checkmark.png</file>
<file>icons/cross.png</file>
<file>icons/add.png</file>
<file>icons/close.png</file>
<file>icons/delete.png</file>
<file>icons/east.png</file>
<file>icons/ic_navigate_before_black_48dp.png</file>
<file>icons/ic_navigate_before_white_48dp.png</file>
<file>icons/ic_navigate_next_black_48dp.png</file>
<file>icons/ic_navigate_next_white_48dp.png</file>
<file>icons/kIRIN.png</file>
<file>icons/ic_folder_black_24dp.png</file>
<file>icons/ic_folder_white_24dp.png</file>
<file>icons/ic_close_white_24dp.png</file>
<file>icons/ic_crop_7_5_white_24dp.png</file>
<file>icons/ic_crop_square_white_24dp.png</file>
<file>icons/ic_remove_white_24dp.png</file>
<file>icons/Logo.png</file>
<file>icons/arrow-down.png</file>
<file>icons/arrow-left.png</file>
<file>icons/arrow-right.png</file>
<file>icons/ic_info_outline_white_24dp.png</file>
<file>icons/ic_palette_white_24dp.png</file>
<file>icons/app.ico</file>
</qresource>
<qresource prefix="/qss">
<file>themes/Default-0.qss</file>
<file>themes/Default-1.qss</file>
<file>themes/Default-2.qss</file>
<file>themes/Default-3.qss</file>
<file>themes/Default-4.qss</file>
<file>themes/Default-5.qss</file>
<file>themes/Default-6.qss</file>
</qresource>
<qresource prefix="/images">
<file>images/KirinBackground.png</file>
</qresource>
<qresource prefix="/translations">
<file>translations/kirinui_ch_zn.qm</file>
<file>translations/kirinui_en.qm</file>
</qresource>
</RCC>
Loading

0 comments on commit e4cc3b2

Please sign in to comment.