Giter Site home page Giter Site logo

第一个问题:baseline 录制了43张图片,screenshot 43张图片跟 base line进行对比,最后得到的结果是baseline 第一张跟 screenshot的第二/第三张相似,预期结果应该是baseline第一张跟screenshot第一张相似,baseline 第二张 跟screenshot 第二张相似。主要原因是两张最相似的图片的mean_squared_error_result函数得出的值不一定是最小 about pic-diff-recognizer HOT 4 CLOSED

amazingtest avatar amazingtest commented on August 23, 2024
第一个问题:baseline 录制了43张图片,screenshot 43张图片跟 base line进行对比,最后得到的结果是baseline 第一张跟 screenshot的第二/第三张相似,预期结果应该是baseline第一张跟screenshot第一张相似,baseline 第二张 跟screenshot 第二张相似。主要原因是两张最相似的图片的mean_squared_error_result函数得出的值不一定是最小

from pic-diff-recognizer.

Comments (4)

amazingTest avatar amazingTest commented on August 23, 2024

第一个问题:相似算法就是比谁mean_squared_error最小,他最小就代表算法承认他是最相似。用这个算法作为初步筛选是因为他速度最快。
第二个问题:这个问题具体怎么复现可以说下吗,我实践中没有发现

from pic-diff-recognizer.

aajron avatar aajron commented on August 23, 2024

窗口大小主要是selenium的set_window_size和js 的return document.documentElement.scrollWidth差了竖向滚动条+一个边边。例如屏幕大小1024,window size 1024, document.documentElement.scrollWidth 第一次 = 991, 滚动条 = 19,还有一点边边 = 14

from pic-diff-recognizer.

amazingTest avatar amazingTest commented on August 23, 2024

是这样,我在实现过程中可能也遇到了这个问题,没有太深究,感谢反馈,能提pr修复就更好了 😄 @aajron

from pic-diff-recognizer.

aajron avatar aajron commented on August 23, 2024

目前我的做法是有竖向滚动条的时候,就固定浏览器一个宽度不变,只改变高度。有个建议:第二遍截图时,最好重新实例化driver,保证跟第一遍的操作一致(主要防止宽高的问题)

from pic-diff-recognizer.

Related Issues (2)

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.