• Stars
    star
    116
  • Rank 303,894 (Top 6 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Finding a panel inside a comic page is the hardest thing I've ever done in computer science!

DeepPanel Train

Python project used to implement comic vignettes segmentation using a machine learning method named deep learning.

DeepPanel let's you extract all the panels' location from a comic page using a machine learning model trained in this repository. This project does not use Open CV but a deep learning model designed for image segmentation based on a convolutional neural network named U-Net. We've optimized our model in terms of size and performance for mobile applications. Powered by TensorFlow, DeepPanel is able to find all the panels' location in less than a second.

You can find this model's application for Android and iOS in these GitHub repositories:

Keep in mind, this artificial intelligence solution is designed to simulate the human reading behavior and it will group panels that are related as a human would do while reading a comic book page. When analyzing a page we do not use image processing algorithms in order to find the panels. Our solution is based on deep learning. We do not use contour detection algorithms at all even when the samples analysis can look similar. If you are looking for a panels contouring solution you can use Open CV or any other image analysis tools like this project does.

Original Analyzed
page page
page page

All the pages used in our sample project are created by Peper & Carrot which is a free comic book you should read right now 鉂わ笍

How to use DeepPanel

  1. Install Python 3.7.
  2. If you are a OSX user remeber to execute the script Install Certificates you'll find inside the Applications/Python3 installation folder
  3. Install pip
  4. Install pipenv: pip3 install pipenv
  5. Install graphviz with this command: brew install graphviz or apt-get install graphviz.
  6. Create your pipenv enviornment: pipenv install
  7. Start pipenv environment: pipenv shell
  8. Execute any of the scripts ready to use:
  • python DeepPanel.py: Trains the model saves a file with the result.
  • python DeepPanelMobile.py: Exports the already trained model for the mobile libraries.
  • python DeepPanelTest.py: Using the already trained and saved model analyzes some pages and saves the results.

Dataset

Keep in mind you'll have to create your own dataset before training the model. We provide some images as an example but the real dataset used to train the model used in our Android and iOS libraries is not provided. Inside the dataset folder you'll find two folders where you should place your raw pages and the pages you've already analyzed. Remember this is a supervised model and you'll need to create your own dataset to be able to train it.

dataset
 | - test
 | ----| - raw
 | ----| - segmentation_mask
 | - training
 | ----| - raw
 | ----| - segmentation_mask

Images in raw folders will be .jpg images. Images inside the segmentation_mask folder will use a .png format without alpha, compression, or optimizations. Inside should place pixes with three colors:

  • Full RGB blue for background.
  • Full RGB red for border.
  • Full RGB green for panel content.

Raw pages and masked pages have to use the same name in different folders.

Model performance

These are the metrics collected during the model training with our private dataset composed by:

  • 550 pages for our training dataset.
  • 83 pages for our testing dataset.

Accuracy

acc

Accuracy per label

acc acc acc acc

Loss

acc

Do you want to contribute?

Feel free to contribute, we will be glad to improve this project with your help. Keep in mind that your PRs must be validated by Travis-CI before being reviewed by any core contributor.

Acknowledgement

Special thanks to Asun, who never doubt we could publish this project 鉂わ笍

Developed By

Follow me on Twitter Add me to Linkedin

License

Copyright 2020 Pedro Vicente G贸mez S谩nchez

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

EffectiveAndroidUI

Sample project created to show some of the best Android practices to work in the Android UI Layer. The UI layer of this project has been implemented using MVP or MVVM (without binding engine) to show how this patterns works. This project is used during the talk "EffectiveAndroidUI".
Java
6,027
star
2

AndroidWiFiADB

IntelliJ/AndroidStudio plugin which provides a button to connect your Android device over WiFi to install, run and debug your applications without a USB connected.
Java
4,138
star
3

DraggablePanel

Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.
Java
2,996
star
4

Algorithms

Solutions for some common algorithm problems written in Java.
Java
2,776
star
5

Renderers

Renderers is an Android library created to avoid all the boilerplate needed to use a RecyclerView/ListView with adapters.
Java
1,205
star
6

Shot

Screenshot testing library for Android
Kotlin
1,173
star
7

Lynx

Lynx is an Android library created to show a custom view with all the information Android logcat is printing, different traces of different levels will be rendererd to show from log messages to your application exceptions. You can filter this traces, share your logcat to other apps, configure the max number of traces to show or the sampling rate used by the library.
Java
773
star
8

TuentiTV

Tuenti application for Android TV created to show some of the most important features related to Android TV projects. This little sample uses mocked data to simulate an application working with information from Tuenti servers.
Java
381
star
9

Nox

Nox is an Android library created to show a custom view with some images or drawables inside which are drawn following a shape indicated by the library user.
Java
274
star
10

AndroidGameBoyEmulator

Android Game Boy Emulator written in Java
Java
233
star
11

KotlinKatas

Kotlin training repository used to learn Kotlin and Functional Programming by solving some common katas using just purely functional programming.
Kotlin
135
star
12

Kuronometer

Gradle plugin to measure build times. Let's measure how long developers around the world are compiling software.
Scala
74
star
13

Buzz

A portable photo booth built on top of Electron, React and Raspberry Pi.
JavaScript
41
star
14

DeepPaneliOS

Finding a panel inside a comic page is the hardest thing I've ever done in computer science!
Swift
39
star
15

DeepPanelAndroid

Finding a panel inside a comic page is the hardest thing I've ever done in computer science!
Kotlin
38
star
16

Roma

Spark project written in Scala used to perform real time sentiment analysis on top of Twitter's streaming API
Scala
34
star
17

JavaScriptKatas

JavaScript training repository used to learn JavaScript by solving some common katas.
JavaScript
32
star
18

SparkPlayground

Playground used to learn and experiment with Apache Spark
Scala
29
star
19

LedStorm

Imagination, some leds, and a RaspberryPi will take you wherever you want
Python
29
star
20

HaskellKatas

Haskell training repository used to learn Haskell and functional programming
Haskell
20
star
21

Dotto

Dotto is an Open Source morse translator for RaspberryPi developed to practice Scala.
Scala
19
star
22

KafkaPlayground

Playground used to learn and experiment with Apache Kafka 馃殌
Scala
18
star
23

TypeScriptKatas

TypeScript training repository used to learn TypeScript by solving some common katas.
TypeScript
17
star
24

UpdateRepos

Update all your git repositories with just one command. A command line tool written in Haskell.
Haskell
16
star
25

SwiftKatas

Swift training repository used to learn Swift and Functional Programming by solving some common katas using just purely functional programming.
Swift
14
star
26

ScalaKatas

Scala training repository used to learn Scala and Functional Programming by solving some common katas using just purely functional programming.
Scala
13
star
27

HWEmoji

AI handwriting recognition for emojis 馃槂
TypeScript
11
star
28

RomanNumerals-Kata

RomanNumerals kata implemented in java by Pedro Vicente G贸mez S谩nchez.
Java
8
star
29

HaveANiceDayChromeExtension

Chrome extension to generate smiles thanks to https://github.com/pedrovgs/HaveANiceDay
JavaScript
8
star
30

ScalaFirstSteps

Some samples written in Scala to evaluate some of the most important concepts of this language.
Scala
6
star
31

FizzBuzz-Kata

FizzBuzz kata implemented in java by Pedro Vicente G贸mez S谩nchez.
Java
6
star
32

Bowling-Kata

Bowling kata implemented in java by Pedro Vicente G贸mez S谩nchez.
Java
6
star
33

StringCalculator-Kata

StringCalculator kata implemented in java by Pedro Vicente G贸mez S谩nchez.
Java
6
star
34

HaveANiceDay

Smiles generator server-side code for https://github.com/delr3ves/haveanicedayandroid.
Scala
5
star
35

Sketches

Where the magic happens 鉁忥笍
5
star
36

KataStringCalculatorSwift

String Calculator Kata implemented in Swift
Swift
5
star
37

HTML5-CSS3-Playground

HTML5 & CSS3 Playground
HTML
3
star
38

ProjectEuler

Solutions for some Project Euler problems written in Scala.
Scala
3
star
39

StringCalculatorTest

Kotlin
2
star
40

RustKatas

Rust training repository used to learn Rust by solving some common katas using this programming language.
Rust
1
star