Giter Club home page Giter Club logo

Comments (3)

WZMIAOMIAO avatar WZMIAOMIAO commented on May 18, 2024

这是因为你没有在my_dataset.py文件中实现获取img_sieze的功能,建议你直接关闭aspect-ratio-group功能。
直接将--aspect-ratio-group-factor值改为-1,关闭此功能

parser.add_argument('--aspect-ratio-group-factor', default=-1, type=int)

from deep-learning-for-image-processing.

uniyushu avatar uniyushu commented on May 18, 2024

感谢up,我直接关闭aspect-ratio-group功能,会报RuntimeError: received 0 items of ancdata错误,加入了get_height_and_width功能,将--workers设置为0之后就不用遍历整个数据集了。
def get_height_and_width(self, idx): data = self.img_data[idx] data_height = int(data["heigh"]) data_width = int(data["width"]) return data_height, data_width
image

from deep-learning-for-image-processing.

WZMIAOMIAO avatar WZMIAOMIAO commented on May 18, 2024

恩,自己实现下get_height_and_width方法,不让它自动去挨个读取图像然后统计height和width是最好的。

from deep-learning-for-image-processing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.