Comments (12)
我用python重写了这个代码,速度在14ms,有兴趣的可以支持下,https://github.com/RubanSeven/Text-Image-Augmentation-python
from text-image-augmentation.
这个工程比较困难的地方就是boost的安装,其他的都还好,尝试了python3环境下运行,安装boost的时候,编译之前给了参数 --with-python=/dir/../python3, 结果没有运行成功,在导入import Augment这句报错,无法导入动态module,缺少函数......如果作者有精力请推出python3版本,感激不尽
from text-image-augmentation.
@tnkong If you want to build it with python3, you just have to install boost for python3. Installing it using anaconda is a good option. For the import
part, you gotta have a well-built Augment.so
in the same directory for python to be able to import it.
from text-image-augmentation.
正如 @ @keeofkoo 所说,只需要安装在Python 3环境中安装好boost即可。这里需要注意的是,这个项目依赖于OpenCV 2,更高的版本不支持。这个项目虽然有用,但是使用起来确实麻烦,希望能够和大家合作把它完善一下。 @tnkong
from text-image-augmentation.
@Canjie-Luo @keeofkoo 问题卡在编译的地方了,我想应该是调用cmake命令这句话, 我没学过相关的知识,转行做深度学习,没碰过C语言相关的东西,所以...
从编译时返回的日志看,编译过程自动修改为python2.7的bosst支持,我的确也装了python3的boost支持包
一下是日志
cmake -D CUDA_USE_STATIC_CUDA_RUNTIME=OFF ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.12", minimum required is "2.7") # 请留心这个地方
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
Imported targets not available for Boost version 106700
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
我的直觉认为这个玩具需要修改CMakeLists.txt, 不过我没有对应的知识
from text-image-augmentation.
到后面执行make命令,都是用python2完成的,即使boost用python3安装的也不行, 应该是需要修改编译调用的程序
make
Scanning dependencies of target Augment
[ 12%] Building CXX object CMakeFiles/Augment.dir/src/imgwarp_piecewiseaffine.cpp.o
[ 25%] Building CXX object CMakeFiles/Augment.dir/src/imgwarp_mls_rigid.cpp.o
[ 37%] Building CXX object CMakeFiles/Augment.dir/src/delaunay.cpp.o
[ 50%] Building CXX object CMakeFiles/Augment.dir/src/imgwarp_mls.cpp.o
[ 62%] Building CXX object CMakeFiles/Augment.dir/src/conversion.cpp.o
In file included from /usr/include/python2.7/numpy/ndarraytypes.h:1777:0,
from /usr/include/python2.7/numpy/ndarrayobject.h:18,
from /home/tnkong/PycharmProjects/HanWangProJectPython/imageAugment/include/conversion.h:8,
from /home/tnkong/PycharmProjects/HanWangProJectPython/imageAugment/src/conversion.cpp:1:
/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
[ 75%] Building CXX object CMakeFiles/Augment.dir/src/Augment.cpp.o
In file included from /usr/include/python2.7/numpy/ndarraytypes.h:1777:0,
from /usr/include/python2.7/numpy/ndarrayobject.h:18,
from /home/tnkong/PycharmProjects/HanWangProJectPython/imageAugment/include/conversion.h:8,
from /home/tnkong/PycharmProjects/HanWangProJectPython/imageAugment/src/Augment.cpp:7:
/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
[ 87%] Building CXX object CMakeFiles/Augment.dir/src/imgwarp_mls_similarity.cpp.o
[100%] Linking CXX shared library Augment.so
[100%] Built target Augment
from text-image-augmentation.
好的,收到您的问题了,我回头研究一下哈,最近手上确实太多东西要完成。
from text-image-augmentation.
请问在python3下面你们可以运行么?怎么将这个嵌入crnn训练做数据增强,有人试验过么?我在crnn训练的时候随机对原图进行三种变化之一,可是程序在docker里面都会报错Connection reset by peer,然后产生core.***的文件。这个项目下的demo.py我是可运行的。就是训练时候出错
from text-image-augmentation.
im_Distort = Augment.GenerateDistort(im, 4)
我把上面的4变小一点,出现错误跟#3一样,Floating point exception.
错误是在训练了一些迭代之后出现的
from text-image-augmentation.
您好,您的输入原图不能够太小,否则扭动不了。另外,可以在
https://github.com/meijieru/crnn.pytorch/blob/d3a47f91691b31b8d5336e2ed5932e6cf65142f0/dataset.py#L69
这个类中嵌入。实在不行的话,您可以生成足够多的样本放在硬盘再训练也行。
from text-image-augmentation.
请问这个原图太小指的图片高度大概多少啊,我用的就是crnn的synth90k那个数据集,图片高度基本都是30多像素。请问形变之前都得resize到相同的形状么
from text-image-augmentation.
是的,从这个数据集中拿出来的图像,不一定符合这个大小,需要先resize一下。
from text-image-augmentation.
Related Issues (12)
- I got 'float point exception: core dumped' transforming pics of short cols. HOT 2
- About Joint Training HOT 10
- Why oldDotL are set by DstPoints ? HOT 1
- running into problems during make HOT 2
- About the agent updating and initialization HOT 1
- CMake fail HOT 5
- floating point exception (core dumped) when process images with different size HOT 3
- i got some trouble in 'make' HOT 4
- cmake problem HOT 6
- Is this project still in development? HOT 1
- undefined symbol: _ZN2cv6formatB5cxx11EPKcz HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from text-image-augmentation.