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
59694775
Commit
59694775
authored
Dec 15, 2020
by
weishengyu
Browse files
add headers and remove useless import
parent
181b2933
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
43 additions
and
19 deletions
+43
-19
tools/style_text_rec/arch/base_module.py
tools/style_text_rec/arch/base_module.py
+1
-1
tools/style_text_rec/arch/decoder.py
tools/style_text_rec/arch/decoder.py
+1
-0
tools/style_text_rec/arch/encoder.py
tools/style_text_rec/arch/encoder.py
+1
-0
tools/style_text_rec/arch/spectral_norm.py
tools/style_text_rec/arch/spectral_norm.py
+0
-4
tools/style_text_rec/arch/style_text_rec.py
tools/style_text_rec/arch/style_text_rec.py
+0
-3
tools/style_text_rec/engine/corpus_generators.py
tools/style_text_rec/engine/corpus_generators.py
+14
-2
tools/style_text_rec/engine/synthesisers.py
tools/style_text_rec/engine/synthesisers.py
+13
-0
tools/style_text_rec/engine/text_drawers.py
tools/style_text_rec/engine/text_drawers.py
+0
-1
tools/style_text_rec/tools/synth_dataset.py
tools/style_text_rec/tools/synth_dataset.py
+13
-0
tools/style_text_rec/utils/config.py
tools/style_text_rec/utils/config.py
+0
-1
tools/style_text_rec/utils/load_params.py
tools/style_text_rec/utils/load_params.py
+0
-6
tools/style_text_rec/utils/logging.py
tools/style_text_rec/utils/logging.py
+0
-1
No files found.
tools/style_text_rec/arch/base_module.py
View file @
59694775
...
@@ -11,9 +11,9 @@
...
@@ -11,9 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
functools
import
paddle
import
paddle
import
paddle.nn
as
nn
import
paddle.nn
as
nn
from
arch.spectral_norm
import
spectral_norm
from
arch.spectral_norm
import
spectral_norm
...
...
tools/style_text_rec/arch/decoder.py
View file @
59694775
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
# limitations under the License.
# limitations under the License.
import
paddle
import
paddle
import
paddle.nn
as
nn
import
paddle.nn
as
nn
from
arch.base_module
import
SNConv
,
SNConvTranspose
,
ResBlock
from
arch.base_module
import
SNConv
,
SNConvTranspose
,
ResBlock
...
...
tools/style_text_rec/arch/encoder.py
View file @
59694775
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
# limitations under the License.
# limitations under the License.
import
paddle
import
paddle
import
paddle.nn
as
nn
import
paddle.nn
as
nn
from
arch.base_module
import
SNConv
,
SNConvTranspose
,
ResBlock
from
arch.base_module
import
SNConv
,
SNConvTranspose
,
ResBlock
...
...
tools/style_text_rec/arch/spectral_norm.py
View file @
59694775
...
@@ -11,10 +11,6 @@
...
@@ -11,10 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
math
import
numpy
as
np
import
paddle
import
paddle
import
paddle.nn
as
nn
import
paddle.nn
as
nn
import
paddle.nn.functional
as
F
import
paddle.nn.functional
as
F
...
...
tools/style_text_rec/arch/style_text_rec.py
View file @
59694775
...
@@ -11,9 +11,6 @@
...
@@ -11,9 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
numpy
as
np
import
cv2
import
math
import
paddle
import
paddle
import
paddle.nn
as
nn
import
paddle.nn
as
nn
...
...
tools/style_text_rec/engine/corpus_generators.py
View file @
59694775
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# 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.
import
random
import
random
from
PIL
import
Image
,
ImageDraw
,
ImageFont
import
numpy
as
np
from
utils.logging
import
get_logger
from
utils.logging
import
get_logger
...
...
tools/style_text_rec/engine/synthesisers.py
View file @
59694775
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# 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.
import
os
import
os
from
utils.config
import
ArgsParser
,
load_config
,
override_config
from
utils.config
import
ArgsParser
,
load_config
,
override_config
...
...
tools/style_text_rec/engine/text_drawers.py
View file @
59694775
import
random
from
PIL
import
Image
,
ImageDraw
,
ImageFont
from
PIL
import
Image
,
ImageDraw
,
ImageFont
import
numpy
as
np
import
numpy
as
np
from
utils.logging
import
get_logger
from
utils.logging
import
get_logger
...
...
tools/style_text_rec/tools/synth_dataset.py
View file @
59694775
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# 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.
from
engine.synthesisers
import
DatasetSynthesiser
from
engine.synthesisers
import
DatasetSynthesiser
...
...
tools/style_text_rec/utils/config.py
View file @
59694775
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
yaml
import
yaml
import
os
import
os
from
collections
import
OrderedDict
from
argparse
import
ArgumentParser
,
RawDescriptionHelpFormatter
from
argparse
import
ArgumentParser
,
RawDescriptionHelpFormatter
...
...
tools/style_text_rec/utils/load_params.py
View file @
59694775
...
@@ -11,13 +11,7 @@
...
@@ -11,13 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
os
import
os
import
paddle
import
paddle
__all__
=
[
'load_dygraph_pretrain'
]
__all__
=
[
'load_dygraph_pretrain'
]
...
...
tools/style_text_rec/utils/logging.py
View file @
59694775
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
os
import
os
import
sys
import
sys
import
logging
import
logging
...
...
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