Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

老师您好,请问Polygon的版本和安装过程 #11

Open
ume-technology opened this issue Mar 27, 2023 · 10 comments
Open

老师您好,请问Polygon的版本和安装过程 #11

ume-technology opened this issue Mar 27, 2023 · 10 comments

Comments

@ume-technology
Copy link

老师您好,我尝试运行该repo时,碰到Polygon怎么都安装不上去的情况。我查资料试了Polygon2 Polygon3 polygon 等等版本,Windows ,Linux ,mac 都测试了。 但是运行test.py时依然爆出没有Polygon的错误。 我也尝试想从源码安装,但是我没找到Polygon的项目源码。请问老师你的Polygon版本是多少,以及是如何安装的呢? 我不确定问题到底出在了哪里,因为我从readme中提到的 python3.6 to python3.9 都测试。 很无奈没成功,因此特来请教,希望得到老师的帮助。 再次谢过老师!

@ume-technology
Copy link
Author

另外老师再请教一个问题,我不是太明白整个代码的测试过,因为我现在在做的是先把流程跑通。我把您发布出来的re-train的model文件放在了 test.py --model 参数下。但是如下的代码我没看懂,为什么在测试阶段,您需要读取 all-labels 数据呢?另外
structure_im 这个数据集我也没看懂。我知道我还有很多细节没注意到导致这些问题的产生。但是还是希望老师先给予我一些明确问题的指点。

` gt = cv2.imread(self.data[index].replace('all_images', 'all_labels'))
gt = cv2.cvtColor(gt, cv2.COLOR_BGR2RGB)

    ### structure ###
    structure_im = cv2.imread(self.data[index].replace('all_images', 'structure_im'))
    structure_im = cv2.cvtColor(structure_im, cv2.COLOR_BGR2RGB)`

@lcy0604
Copy link
Owner

lcy0604 commented Mar 29, 2023 via email

@ume-technology
Copy link
Author

ume-technology commented Mar 29, 2023 via email

@ume-technology
Copy link
Author

ume-technology commented Mar 30, 2023

老师您好,我已经尝试了获取structure数据的算法代码,我看到这个算法的实现是基于matlab,我刚好本地安装了matlab engine,但是我在运行这个Structure Extraction from Texture via Relative Total Variation给出的matlab代码时,我的整体执行逻辑如下,以及爆出如下错误:

`>>> eng.Demo(nargout=0)
'padarray' Image Processing Toolbox

tsmooth>computeTextureWeights ( 67 )
fx = padarray(fx, [0 1 0], 'post');

tsmooth ( 54 )
[wx, wy] = computeTextureWeights(x, sigma_iter, sharpness);

Demo ( 5 )
S = tsmooth(I,0.015,3);

Traceback (most recent call last):
File "", line 1, in
File "D:\downWindowsCondaEnvs\mctrnet\lib\site-packages\matlabengineforpython-r2022a-py3.8.egg\matlab\engine\matlabengine.py", line 70, in call
return FutureResult(self._engine(), future, nargs, _stdout,
File "D:\downWindowsCondaEnvs\mctrnet\lib\site-packages\matlabengineforpython-r2022a-py3.8.egg\matlab\engine\futureresult.py", line 67, in result
return self.__future.result(timeout)
File "D:\downWindowsCondaEnvs\mctrnet\lib\site-packages\matlabengineforpython-r2022a-py3.8.egg\matlab\engine\fevalfuture.py", line 82, in result
self._result = pythonengine.getFEvalResult(self._future,self._nargout, None, out=self._out, err=self.err)
matlab.engine.MatlabExecutionError:
File F:\mCTRNet\tsmoothing\code
\tsmooth.m, line 67, in computeTextureWeights

File F:\mCTRNet\tsmoothing\code_\tsmooth.m, line 54, in tsmooth

File F:\mCTRNet\tsmoothing\code_\Demo.m, line 5, in Demo
未定义与 'double' 类型的输入参数相对应的函数 'padarray'。
`

因此我想请教老师的是,由于我暂时无法理解matlab的编程方式,因此需要请求的是您能否把您转化生成structure数据可运行的的 matlab 代码发一份给我呢?

我的目的只是想生成一些自己的 structure 数据,然后擦除一些自己的数据上的文本。

期待得到老师的指点! 感谢!

@lcy0604
Copy link
Owner

lcy0604 commented Mar 31, 2023 via email

@ume-technology
Copy link
Author

感谢老师的指点。我在上述项目找到了更清晰的代码执行过程。 非常感谢老师的指点与帮助!

@ume-technology
Copy link
Author

老师您好,我再请教一个问题,对于训练数据中,文字是弯曲性状的,或者说不规则性状的样式,训练数据中的文字坐标是如何识别出来的呢? 您能不能指点一下。 另外我作为图像方向新的菜鸡,我想知道我如果需要使用您这个模型,我需要对我的数据做怎样的数据预处理呢?我看到您训练数据的格式都是统一的大小格式,我是不是也需要把我自己的图像也处理成您发布的数据格式呢,因为我试着把我的数据集识别了文字坐标,生成了all_gts文件,也生成了structure_im文件,但是爆出了tensor无法拼接的异常,因此我也试着去debug了您的model文件夹中的代码,整体的模型实现对我来说流程还是相对复杂的,因此我还是想让您在上述的两个问题上给我指点一二。我的提问不在于我使用了我的数据导致model中的tensor维度出现错误,因为如果是那样,我会再去学习代码。我的目的在于您能否明确的告诉我该模型的数据是否以及需要怎样的数据预处理。 以免我在运行代码之初就走错方向。 感谢老师的耐心!

@ume-technology
Copy link
Author

另外由于您的这个模型并没有发布训练过程的打算,我如果能跑通您这个流程,也算是我的一个工具集中的一个工具。 感谢老师您的工作! 还是希望老师能针对上述问题指点一二。

@lcy0604
Copy link
Owner

lcy0604 commented Apr 4, 2023 via email

@ume-technology
Copy link
Author

ume-technology commented Apr 6, 2023

感谢老师的帮助。我已经运行成功了老师的代码。出现tensor cat异常确实和图像的尺寸有关。 老师给出的数据集的尺寸都是512 * 512,否则就会报错,因此需要尺寸的统一这样的预处理。 但是老师,我好想看到您的这个代码的训练过程。您能不能私发一份给我呢? 如果老师不便在GitHub上答复这个问题,我的微信是18336304089 邮箱是 [email protected] ; 学生感激不尽,千真万确只做学习。无论如何,真的感谢老师的帮助与指导!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants