visual-layer / fastdup

fastdup is a powerful free tool designed to rapidly extract valuable insights from your image & video datasets. Assisting you to increase your dataset images & labels quality and reduce your data operations costs at an unparalleled scale.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Image search parameters not passed to search function when using DINOv2s

dnth opened this issue · comments

What happened?

I ran fastdup with model_path='dinov2s'. However when I ran init_search

fastdup.init_search(10, work_dir="kaggle/working/work_dir_search")

I notice that the d and model_path are NOT passed into the init_search function. It defaults to using

  • d=576
  • model_path=/home/dnth/anaconda3/envs/dinov2/lib/python3.10/site-packages/fastdup/UndisclosedFastdupModel.ort

To make the search function work with dinov2s I had to specify the parameters explicitly:

fastdup.init_search(10, work_dir="kaggle/working/work_dir_search", d=384, model_path='/home/dnth/dinov2_vits14.onnx')

What did you expect to see?

Arguments are passed into the search function without users specifying it explicitly.

The usage of

fastdup.init_search(10, work_dir="kaggle/working/work_dir_search")

Should be the same regardless of whether the user uses dinov2s or fastdup model.

What version of fastdup were you runnning on?

1.38

What version of Python were you running on?

Python 3.10

Operating System

Ubuntu 22.04

Reproduction steps

No response

Relevant log output

No response

Attach a screenshot [Optional]

No response

Contact Details [Optional]

No response

@dnth please create a function def init_search inside of fastdup_controller, it will call the fastdup.init_search() and assign d and model path from self. (fastdup has no state, fd.init_search() will have state

Currently fd.init_search returns an error. As far as I remember V1 API does not yet support search.

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[14], line 1
----> 1 fd.init_search(10)

AttributeError: 'Fastdup' object has no attribute 'init_search'

should be fixed in 1.41