Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
83303bc7
Commit
83303bc7
authored
Oct 09, 2021
by
LDOUBLEV
Browse files
fix conflicts
parents
3af943f3
af0bac58
Changes
424
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
255 additions
and
0 deletions
+255
-0
deploy/android_demo/app/src/main/res/layout/activity_mini.xml
...oy/android_demo/app/src/main/res/layout/activity_mini.xml
+46
-0
deploy/android_demo/app/src/main/res/menu/menu_action_options.xml
...ndroid_demo/app/src/main/res/menu/menu_action_options.xml
+10
-0
deploy/android_demo/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
...d_demo/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+5
-0
deploy/android_demo/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
.../app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+5
-0
deploy/android_demo/app/src/main/res/mipmap-hdpi/ic_launcher.png
...android_demo/app/src/main/res/mipmap-hdpi/ic_launcher.png
+0
-0
deploy/android_demo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
...d_demo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
+0
-0
deploy/android_demo/app/src/main/res/mipmap-mdpi/ic_launcher.png
...android_demo/app/src/main/res/mipmap-mdpi/ic_launcher.png
+0
-0
deploy/android_demo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
...d_demo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
+0
-0
deploy/android_demo/app/src/main/res/mipmap-xhdpi/ic_launcher.png
...ndroid_demo/app/src/main/res/mipmap-xhdpi/ic_launcher.png
+0
-0
deploy/android_demo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
..._demo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
+0
-0
deploy/android_demo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
...droid_demo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
+0
-0
deploy/android_demo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
...demo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
+0
-0
deploy/android_demo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
...roid_demo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
+0
-0
deploy/android_demo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
...emo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
+0
-0
deploy/android_demo/app/src/main/res/values/arrays.xml
deploy/android_demo/app/src/main/res/values/arrays.xml
+51
-0
deploy/android_demo/app/src/main/res/values/colors.xml
deploy/android_demo/app/src/main/res/values/colors.xml
+6
-0
deploy/android_demo/app/src/main/res/values/strings.xml
deploy/android_demo/app/src/main/res/values/strings.xml
+26
-0
deploy/android_demo/app/src/main/res/values/styles.xml
deploy/android_demo/app/src/main/res/values/styles.xml
+25
-0
deploy/android_demo/app/src/main/res/xml/file_paths.xml
deploy/android_demo/app/src/main/res/xml/file_paths.xml
+4
-0
deploy/android_demo/app/src/main/res/xml/settings.xml
deploy/android_demo/app/src/main/res/xml/settings.xml
+77
-0
No files found.
deploy/android_demo/app/src/main/res/layout/activity_mini.xml
0 → 100644
View file @
83303bc7
<?xml version="1.0" encoding="utf-8"?>
<!-- for MiniActivity Use Only -->
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintLeft_toRightOf=
"parent"
tools:context=
".MainActivity"
>
<TextView
android:id=
"@+id/sample_text"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:text=
"Hello World!"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/imageView"
android:scrollbars=
"vertical"
/>
<ImageView
android:id=
"@+id/imageView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingTop=
"20dp"
android:paddingBottom=
"20dp"
app:layout_constraintBottom_toTopOf=
"@id/imageView"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:srcCompat=
"@tools:sample/avatars"
/>
<Button
android:id=
"@+id/button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"4dp"
android:text=
"Button"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
tools:layout_editor_absoluteX=
"161dp"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
deploy/android_demo/app/src/main/res/menu/menu_action_options.xml
0 → 100644
View file @
83303bc7
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<group>
<item
android:id=
"@+id/settings"
android:title=
"Settings..."
app:showAsAction=
"withText"
/>
</group>
</menu>
deploy/android_demo/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
0 → 100644
View file @
83303bc7
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@drawable/ic_launcher_background"
/>
<foreground
android:drawable=
"@drawable/ic_launcher_foreground"
/>
</adaptive-icon>
\ No newline at end of file
deploy/android_demo/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
0 → 100644
View file @
83303bc7
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<background
android:drawable=
"@drawable/ic_launcher_background"
/>
<foreground
android:drawable=
"@drawable/ic_launcher_foreground"
/>
</adaptive-icon>
\ No newline at end of file
deploy/android_demo/app/src/main/res/mipmap-hdpi/ic_launcher.png
0 → 100644
View file @
83303bc7
2.89 KB
deploy/android_demo/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
0 → 100644
View file @
83303bc7
4.79 KB
deploy/android_demo/app/src/main/res/mipmap-mdpi/ic_launcher.png
0 → 100644
View file @
83303bc7
2.01 KB
deploy/android_demo/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
0 → 100644
View file @
83303bc7
2.72 KB
deploy/android_demo/app/src/main/res/mipmap-xhdpi/ic_launcher.png
0 → 100644
View file @
83303bc7
4.38 KB
deploy/android_demo/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
0 → 100644
View file @
83303bc7
6.73 KB
deploy/android_demo/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
0 → 100644
View file @
83303bc7
6.24 KB
deploy/android_demo/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
0 → 100644
View file @
83303bc7
10.2 KB
deploy/android_demo/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
0 → 100644
View file @
83303bc7
8.91 KB
deploy/android_demo/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
0 → 100644
View file @
83303bc7
14.8 KB
deploy/android_demo/app/src/main/res/values/arrays.xml
0 → 100644
View file @
83303bc7
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array
name=
"image_name_entries"
>
<item>
0.jpg
</item>
<item>
90.jpg
</item>
<item>
180.jpg
</item>
<item>
270.jpg
</item>
</string-array>
<string-array
name=
"image_name_values"
>
<item>
images/0.jpg
</item>
<item>
images/90.jpg
</item>
<item>
images/180.jpg
</item>
<item>
images/270.jpg
</item>
</string-array>
<string-array
name=
"cpu_thread_num_entries"
>
<item>
1 threads
</item>
<item>
2 threads
</item>
<item>
4 threads
</item>
<item>
8 threads
</item>
</string-array>
<string-array
name=
"cpu_thread_num_values"
>
<item>
1
</item>
<item>
2
</item>
<item>
4
</item>
<item>
8
</item>
</string-array>
<string-array
name=
"cpu_power_mode_entries"
>
<item>
HIGH(only big cores)
</item>
<item>
LOW(only LITTLE cores)
</item>
<item>
FULL(all cores)
</item>
<item>
NO_BIND(depends on system)
</item>
<item>
RAND_HIGH
</item>
<item>
RAND_LOW
</item>
</string-array>
<string-array
name=
"cpu_power_mode_values"
>
<item>
LITE_POWER_HIGH
</item>
<item>
LITE_POWER_LOW
</item>
<item>
LITE_POWER_FULL
</item>
<item>
LITE_POWER_NO_BIND
</item>
<item>
LITE_POWER_RAND_HIGH
</item>
<item>
LITE_POWER_RAND_LOW
</item>
</string-array>
<string-array
name=
"input_color_format_entries"
>
<item>
BGR color format
</item>
<item>
RGB color format
</item>
</string-array>
<string-array
name=
"input_color_format_values"
>
<item>
BGR
</item>
<item>
RGB
</item>
</string-array>
</resources>
\ No newline at end of file
deploy/android_demo/app/src/main/res/values/colors.xml
0 → 100644
View file @
83303bc7
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color
name=
"colorPrimary"
>
#008577
</color>
<color
name=
"colorPrimaryDark"
>
#00574B
</color>
<color
name=
"colorAccent"
>
#D81B60
</color>
</resources>
deploy/android_demo/app/src/main/res/values/strings.xml
0 → 100644
View file @
83303bc7
<resources>
<string
name=
"app_name"
>
OCR Chinese
</string>
<string
name=
"CHOOSE_PRE_INSTALLED_MODEL_KEY"
>
CHOOSE_PRE_INSTALLED_MODEL_KEY
</string>
<string
name=
"ENABLE_CUSTOM_SETTINGS_KEY"
>
ENABLE_CUSTOM_SETTINGS_KEY
</string>
<string
name=
"MODEL_PATH_KEY"
>
MODEL_PATH_KEY
</string>
<string
name=
"LABEL_PATH_KEY"
>
LABEL_PATH_KEY
</string>
<string
name=
"IMAGE_PATH_KEY"
>
IMAGE_PATH_KEY
</string>
<string
name=
"CPU_THREAD_NUM_KEY"
>
CPU_THREAD_NUM_KEY
</string>
<string
name=
"CPU_POWER_MODE_KEY"
>
CPU_POWER_MODE_KEY
</string>
<string
name=
"INPUT_COLOR_FORMAT_KEY"
>
INPUT_COLOR_FORMAT_KEY
</string>
<string
name=
"INPUT_SHAPE_KEY"
>
INPUT_SHAPE_KEY
</string>
<string
name=
"INPUT_MEAN_KEY"
>
INPUT_MEAN_KEY
</string>
<string
name=
"INPUT_STD_KEY"
>
INPUT_STD_KEY
</string>
<string
name=
"SCORE_THRESHOLD_KEY"
>
SCORE_THRESHOLD_KEY
</string>
<string
name=
"MODEL_PATH_DEFAULT"
>
models/ocr_v2_for_cpu
</string>
<string
name=
"LABEL_PATH_DEFAULT"
>
labels/ppocr_keys_v1.txt
</string>
<string
name=
"IMAGE_PATH_DEFAULT"
>
images/0.jpg
</string>
<string
name=
"CPU_THREAD_NUM_DEFAULT"
>
4
</string>
<string
name=
"CPU_POWER_MODE_DEFAULT"
>
LITE_POWER_HIGH
</string>
<string
name=
"INPUT_COLOR_FORMAT_DEFAULT"
>
BGR
</string>
<string
name=
"INPUT_SHAPE_DEFAULT"
>
1,3,960
</string>
<string
name=
"INPUT_MEAN_DEFAULT"
>
0.485, 0.456, 0.406
</string>
<string
name=
"INPUT_STD_DEFAULT"
>
0.229,0.224,0.225
</string>
<string
name=
"SCORE_THRESHOLD_DEFAULT"
>
0.1
</string>
</resources>
deploy/android_demo/app/src/main/res/values/styles.xml
0 → 100644
View file @
83303bc7
<resources>
<!-- Base application theme. -->
<style
name=
"AppTheme"
parent=
"Theme.AppCompat.Light.DarkActionBar"
>
<!-- Customize your theme here. -->
<item
name=
"colorPrimary"
>
@color/colorPrimary
</item>
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"actionOverflowMenuStyle"
>
@style/OverflowMenuStyle
</item>
</style>
<style
name=
"OverflowMenuStyle"
parent=
"Widget.AppCompat.Light.PopupMenu.Overflow"
>
<item
name=
"overlapAnchor"
>
false
</item>
</style>
<style
name=
"AppTheme.NoActionBar"
>
<item
name=
"windowActionBar"
>
false
</item>
<item
name=
"windowNoTitle"
>
true
</item>
</style>
<style
name=
"AppTheme.AppBarOverlay"
parent=
"ThemeOverlay.AppCompat.Dark.ActionBar"
/>
<style
name=
"AppTheme.PopupOverlay"
parent=
"ThemeOverlay.AppCompat.Light"
/>
</resources>
deploy/android_demo/app/src/main/res/xml/file_paths.xml
0 → 100644
View file @
83303bc7
<?xml version="1.0" encoding="utf-8"?>
<paths
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<external-files-path
name=
"my_images"
path=
"Pictures"
/>
</paths>
\ No newline at end of file
deploy/android_demo/app/src/main/res/xml/settings.xml
0 → 100644
View file @
83303bc7
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<PreferenceCategory
android:title=
"Model Settings"
>
<ListPreference
android:defaultValue=
"@string/MODEL_PATH_DEFAULT"
android:key=
"@string/CHOOSE_PRE_INSTALLED_MODEL_KEY"
android:negativeButtonText=
"@null"
android:positiveButtonText=
"@null"
android:title=
"Choose pre-installed models"
/>
<CheckBoxPreference
android:defaultValue=
"false"
android:key=
"@string/ENABLE_CUSTOM_SETTINGS_KEY"
android:summaryOn=
"Enable"
android:summaryOff=
"Disable"
android:title=
"Enable custom settings"
/>
<EditTextPreference
android:key=
"@string/MODEL_PATH_KEY"
android:defaultValue=
"@string/MODEL_PATH_DEFAULT"
android:title=
"Model Path"
/>
<EditTextPreference
android:key=
"@string/LABEL_PATH_KEY"
android:defaultValue=
"@string/LABEL_PATH_DEFAULT"
android:title=
"Label Path"
/>
<ListPreference
android:key=
"@string/IMAGE_PATH_KEY"
android:defaultValue=
"@string/IMAGE_PATH_DEFAULT"
android:entries=
"@array/image_name_entries"
android:entryValues=
"@array/image_name_values"
android:title=
"Image Path"
/>
</PreferenceCategory>
<PreferenceCategory
android:title=
"CPU Settings"
>
<ListPreference
android:defaultValue=
"@string/CPU_THREAD_NUM_DEFAULT"
android:key=
"@string/CPU_THREAD_NUM_KEY"
android:negativeButtonText=
"@null"
android:positiveButtonText=
"@null"
android:title=
"CPU Thread Num"
android:entries=
"@array/cpu_thread_num_entries"
android:entryValues=
"@array/cpu_thread_num_values"
/>
<ListPreference
android:defaultValue=
"@string/CPU_POWER_MODE_DEFAULT"
android:key=
"@string/CPU_POWER_MODE_KEY"
android:negativeButtonText=
"@null"
android:positiveButtonText=
"@null"
android:title=
"CPU Power Mode"
android:entries=
"@array/cpu_power_mode_entries"
android:entryValues=
"@array/cpu_power_mode_values"
/>
</PreferenceCategory>
<PreferenceCategory
android:title=
"Input Settings"
>
<ListPreference
android:defaultValue=
"@string/INPUT_COLOR_FORMAT_DEFAULT"
android:key=
"@string/INPUT_COLOR_FORMAT_KEY"
android:negativeButtonText=
"@null"
android:positiveButtonText=
"@null"
android:title=
"Input Color Format: BGR or RGB"
android:entries=
"@array/input_color_format_entries"
android:entryValues=
"@array/input_color_format_values"
/>
<EditTextPreference
android:key=
"@string/INPUT_SHAPE_KEY"
android:defaultValue=
"@string/INPUT_SHAPE_DEFAULT"
android:title=
"Input Shape: (1,1,max_width_height) or (1,3,max_width_height)"
/>
<EditTextPreference
android:key=
"@string/INPUT_MEAN_KEY"
android:defaultValue=
"@string/INPUT_MEAN_DEFAULT"
android:title=
"Input Mean: (channel/255-mean)/std"
/>
<EditTextPreference
android:key=
"@string/INPUT_STD_KEY"
android:defaultValue=
"@string/INPUT_STD_DEFAULT"
android:title=
"Input Std: (channel/255-mean)/std"
/>
</PreferenceCategory>
<PreferenceCategory
android:title=
"Output Settings"
>
<EditTextPreference
android:key=
"@string/SCORE_THRESHOLD_KEY"
android:defaultValue=
"@string/SCORE_THRESHOLD_DEFAULT"
android:title=
"Score Threshold"
/>
</PreferenceCategory>
</PreferenceScreen>
Prev
1
2
3
4
5
6
7
8
9
10
…
22
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment