You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix mypy arg-type errors
Add read_image_rgb helper that raises FileNotFoundError when
cv2.imread returns None, and count queries during iteration in
top_k_accuracy instead of calling len() on an Iterable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix mypy assignment errors
Add missing '| None' to parameters defaulting to None, declare
attribute placeholders with their real types, and correct the
similarity_func type: it returns a similarity matrix (np.ndarray),
not a float. ImageEncoderBase now requires a feature extractor and
defaults similarity_func to cosine_similarity instead of None.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix mypy attr-defined errors
Import FeatureExtractorBase and SimilarityMetric from their defining
module, annotate the _pca/_clustering_model placeholders, and replace
property fget/fset class access with a protected _set_clustering_model
method that subclass setters call directly.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix mypy import-untyped errors
Add per-module ignore_missing_imports overrides for third-party
libraries that ship without type stubs or a py.typed marker.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix mypy misc error
Use non-inplace division in RootSIFT since in-place true division is
not defined for the integer dtypes cv2 may return.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix mypy no-any-return errors
Wrap untyped sklearn results in np.asarray, type the Lambda
extractor's callable precisely, validate the submodule returned by
getattr, and convert scipy .mat labels to int explicitly.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix mypy no-untyped-call errors
Annotate setup_logging, _set_clustering_model, _register_hook,
download_oxford_flowers_data and the SIFT/RootSIFT constructors, and
replace torch's untyped private Module._get_name() with
type(...).__name__.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix mypy no-untyped-def errors
Annotate all remaining functions: typed decorator pattern for
_check_output_shape and _tupleize_first_arg, an Encoder protocol for
eval functions, property getter/setter annotations, and **kwargs
types. similarity_score now honestly returns the np.ndarray
similarity matrix it always produced at runtime.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix mypy operator and return-value errors
Type list_conv_layers as returning Conv2d layers so out_channels is
an int instead of the Tensor | Module union from Module.__getattr__.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix mypy safe-super errors
Remove no-op super().__call__ invocations of the abstract base
method from the feature extractors.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix mypy type-arg errors
Parameterize the bare generic types: list[Any] for the heatmap matrix
and Dataset[tuple[np.ndarray, int, str]] for OxfordFlowerDataset.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix remaining mypy assignment errors
Annotate the hook buffer as Tensor | None, widen the VLAD descriptor
vector annotation, and use a separate variable for the spatial
coordinates array.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* bumpy Python version up to 3.12
* fixed div by zero error in top_k_accuracy
* fixed wrong api in docstring (compute_vector -> encode)
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments