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

TypeError: transforms.arrange must be an Arrange object. #192

Closed
Dingxiangtao opened this issue Apr 9, 2024 · 5 comments
Closed

TypeError: transforms.arrange must be an Arrange object. #192

Dingxiangtao opened this issue Apr 9, 2024 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@Dingxiangtao
Copy link

Thanks for your issue. To help us better solve the issue, please provide the following information:

  1. PaddleRS version: (please specify the branch as well,e.g. PaddleRS release/1.0)
  2. PaddlePaddle version: (e.g. PaddlePaddle 2.3.0)
  3. Operation system: (e.g. Linux/Windows/MacOS)
  4. Python version: (e.g. Python3.7/8)
  5. CUDA/cuDNN version: (e.g. CUDA10.2/cuDNN 7.6.5)
  6. Additional context: (add any other context about the problem)

欢迎您的提问。辛苦您提供以下信息,以方便我们快速定位和解决问题:

  1. PaddleRS版本:PaddleRS-1.0.0
  2. PaddlePaddle版本:2.4.2
  3. 操作系统信息:Windows
  4. Python版本号:Python3.9
  5. CUDA/cuDNN版本:( 如CUDA10.2/cuDNN 7.6.5等)
  6. 其他内容: 用paddlers训练好的道路检测权重部署到WEB上面遇到的问题
  7. Traceback (most recent call last):
    File "E:\teacher_mission\pytorch_flask_service\main.py", line 106, in road_extraction
    pred = predictor.predict(data_path)
    File "D:\Anaconda\envs\paddlers\lib\site-packages\paddlers-1.0.0-py3.9.egg\paddlers\deploy\predictor.py", line 314, in predict
    results = self._run(images=images, topk=topk, transforms=transforms)
    File "D:\Anaconda\envs\paddlers\lib\site-packages\paddlers-1.0.0-py3.9.egg\paddlers\deploy\predictor.py", line 251, in _run
    preprocessed_input = self.preprocess(images, transforms)
    File "D:\Anaconda\envs\paddlers\lib\site-packages\paddlers-1.0.0-py3.9.egg\paddlers\deploy\predictor.py", line 151, in preprocess
    preprocessed_samples = self._model.preprocess(
    File "D:\Anaconda\envs\paddlers\lib\site-packages\paddlers-1.0.0-py3.9.egg\paddlers\tasks\segmenter.py", line 592, in preprocess
    self._check_transforms(transforms, 'test')
    File "D:\Anaconda\envs\paddlers\lib\site-packages\paddlers-1.0.0-py3.9.egg\paddlers\tasks\segmenter.py", line 732, in _check_transforms
    super()._check_transforms(transforms, mode)
    File "D:\Anaconda\envs\paddlers\lib\site-packages\paddlers-1.0.0-py3.9.egg\paddlers\tasks\base.py", line 677, in _check_transforms
    raise TypeError("transforms.arrange must be an Arrange object.")
    TypeError: transforms.arrange must be an Arrange object.
@Dingxiangtao Dingxiangtao added the question Further information is requested label Apr 9, 2024
@github-actions github-actions bot added triage new issue/PR waiting to be dealed and removed triage new issue/PR waiting to be dealed labels Apr 9, 2024
@Dingxiangtao
Copy link
Author

这个权重我是在飞桨平台上的一个开源项目里找的,还有好几个其他遥感解译功能的权重(变化检测,场景分类,目标检测),但在部署过程中均没有碰到这个问题

@Dingxiangtao
Copy link
Author

我在codelab上运行那个开源项目的道路检测时可以正常运行,但部署到自己电脑上就报这个错误了,检测的数据都一样

@Bobholamovic
Copy link
Member

你好,这个项目的代码看起来是基于PaddleRS 1.0-beta的,而从错误日志上看,你在自己电脑上安装的应该是PaddleRS 1.0,这两个版本的PaddleRS存在较大差异,请安装1.0-beta版本~

@Dingxiangtao
Copy link
Author

好的,问题解决啦,感谢回复

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

No branches or pull requests

2 participants