GithubHelp home page GithubHelp logo

sg4dylan / efficientir Goto Github PK

View Code? Open in Web Editor NEW
88.0 88.0 19.0 115.74 MB

人工智障本地图片检索工具 | An EfficientNet based image retrieval tool

License: Apache License 2.0

Python 100.00%
efficientnet-pytorch hnswlib image-retrieval image-search onnx reverse-image-search similarity-search

efficientir's People

Contributors

dependabot[bot] avatar sg4dylan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

efficientir's Issues

想询问一下有关模型的问题

首先称赞一下这个项目,做得非常出色,对我这种刚转向研究ai特征匹配搜索的新手非常有帮助。
我想就模型相关的问题进行一些提问:
①在这个项目里使用的efficient-b2模型,我下载了源生的B2模型并使用了 onnx-simplifier 进行优化,俩者进行比对,我发现整体结构上2者一致,但是该项目中的b2模型去掉了Pad层与BatchNormalization层,并且在我自己的一些实验中特征提取的能力(尤其是单一目标的情况下)要优于源生优化的模型,请问这是有什么原理嘛?
②onnx在遇到这个项目之前只是了解但没有实战过,所以不是很清楚,而且即便是在网上查阅资料也经常找不到所需的信息,所以遇到了一些问题:1.我使用了onnxruntime的gpu版本,但速度不理想,其中会报出没有cuda kernel我也不明白什么意思 2.如何对onnx模型进行修改,比如把batch从1改成100,我现在只能从一开始就下载一个100batch的模型然后再优化 3.请问该项目中的b2模型是如何去掉指定层的,再去掉指定层后有没有进一步做再训练?
如果方便的话,我们可以加QQ或者WX进行讨论,谢谢了。

Windows 环境特定问题

首先感谢本工具作者,这种小众需求真的很难找现成实现。
在 Windows 环境下运行时,有两个环境特定的问题,希望可以进行改进。

1. 对于 UNC 路径的搜索结果,当双击搜索结果条目时,会异常退出。
例如:建立索引时,来源包含 \\10.0.0.1\images,其中一个搜索结果是 \\10.0.0.1\images\1.jpg,当双击搜索结果中的该条目时,程序会异常退出。

2. 对于超长路径,建立索引时会由于超出 Windows 默认的路径最大长度,会在报异常后中断缩进创建流程退出。
如下为日志内容:

删除不存在文件: 0it [00:00, ?it/s]
Traceback (most recent call last):
  File "main.py", line 137, in sync_index
    need_index = utils.index_target_dir(image_dir)
  File "D:\EfficientIR\utils.py", line 59, in index_target_dir
    file_size = os.path.getsize(exists_index[i])
  File "genericpath.py", line 50, in getsize
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: '//10.0.0.1/data/
一级目录\\二级目录\\dir3\\四级目录1234字字5字indd\\“1234.5字字字”文件夹\\“123
4.5字字字”文件夹\\Links\\interior-design-modern-furniture-bathroom-ideas-glitte
ring-minimalist-modern-bathroom-minimalist-white-bathroom-vanity-unit-900mm-mini
malist-white-bathroom-minimalist-black-and-white-bathroom-mi.jpg'

不知是否可进行改进,谢谢!

2022/06/30:由于之前对 Issue 操作不熟悉,误点 Close issue,故在此处更新关于第 2 个问题的说明:

经过二次测试,即使在注册表中启用 LongPathsEnabled,在 Windows 10 下仍然会出现 UNC 超长路径时回报 WinError 3 系统找不到指定的路径的异常,此时可发现异常信息中包含的路径混用了 // 和 \,猜测可能是 UNC 路径中这样撰写不合法。

变通的方法是先将 UNC 路径映射为网络驱动器,然后用映射的盘符建立索引,即可正常使用 LongPathsEnabled 提供的长路径支持,从而正常对图片进行索引更新操作。

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.