Fix bug causing failure to load local models in DeepSORT + ReID#163
Fix bug causing failure to load local models in DeepSORT + ReID#163TserJay wants to merge 8 commits intoroboflow:release/stablefrom
Conversation
|
Hi @TserJay 👋🏻 Thanks for the interest in Trackers and for proposing a fix. After a long pause, the project has entered a buildup phase toward an upcoming release with ByteTrack support. As part of this buildup, the team decided to remove the current For this reason, I need to close this PR, since |
|
Hi @SkalskiP (Piotr Skalski)<https://github.com/SkalskiP> Thanks for the clarification!
I understand that DeepSORT is being deprecated. However, if the new release is still some time away, current users are actively encountering the issue fixed in this PR.
Since many users (myself included) might remain on the current version/tag for a while before migrating to the new API, fixing this bug in the legacy implementation is still valuable.
Is there a maintenance branch based on the v2.0.2rc0 tag where I could retarget this PR? I'd hate for users of the current version to be left with this bug unpatched.
…________________________________
发件人: Piotr Skalski ***@***.***>
发送时间: 2026年1月21日 19:17
收件人: roboflow/trackers ***@***.***>
抄送: TserJay ***@***.***>; Mention ***@***.***>
主题: Re: [roboflow/trackers] Fix bug causing failure to load local models in DeepSORT + ReID (PR #163)
[https://avatars.githubusercontent.com/u/26109316?s=20&v=4]SkalskiP left a comment (roboflow/trackers#163)<#163 (comment)>
Hi @TserJay<https://github.com/TserJay> 👋🏻 Thanks for the interest in Trackers and for proposing a fix. After a long pause, the project has entered a buildup phase toward an upcoming release with ByteTrack support.
As part of this buildup, the team decided to remove the current DeepSORT and ReIDModel implementations from the codebase. See this PR for details: #161<#161>
For this reason, I need to close this PR, since DeepSORT and ReIDModel are scheduled to leave the project anyway. Stay tuned. New trackers are coming to the API soon.
—
Reply to this email directly, view it on GitHub<#163 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARAEE3FYDGKZ7ZK5WD6TXKL4H5N5VAVCNFSM6AAAAACSMFKLXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTONZXGU2DEOJUGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
Hi @TserJay. The new release ships this week. Work on this release happens on the To avoid leaving DeepSORT users without a working version, we should reopen this PR, triage it, and if successful, release |
…rs into dev.load_local_checkpoint
|
Hi @SkalskiP , I've pushed the fixes to resolve the ruff formatting and mypy type errors. The code should be fully compliant now. Could you please approve the workflows so the CI tests can run? I believe the PR is ready for review. 💡 A suggestion for the future migration: When DeepSORT is eventually removed in favor of ByteTrack, it might be helpful to update the README's algorithm table with a "Last Supported Version" column (e.g., noting v2.0.2 for DeepSORT). This would provide a clear reference for users who still need access to legacy trackers. Standing by for your feedback. Thanks! |
5f05879 to
0f9673f
Compare
What does this PR do?
This PR fixes issues related to loading local "vanilla" timm checkpoints (e.g., standard .safetensors files downloaded directly from HuggingFace).
Specifically, it addresses two problems:
Fixes NoneType Error on Missing Metadata: Standard timm checkpoints do not contain the custom "config" key in their metadata. Previously, this caused a TypeError when the code attempted to parse non-existent config data.
Enables Offline Loading: Previously, pretrained=True was hardcoded in _initialize_reid_model_from_timm. This forced a network connection to HuggingFace even when a local checkpoint_path was provided.This PR exposes the pretrained argument via init_kwargs.
Related Issue(s): #120
Type of Change
Testing
Test details:
reid_model = ReIDModel.from_timm(
model_name_or_checkpoint_path="/path/to/local/model.safetensors",
config_path="path/to/local/config.json"
)
Checklist
Additional Context
The standard timm weights only contain tensor data and basic metadata (format info), lacking the custom configuration dictionary expected by the previous implementation. By allowing pretrained to be set to False and bypassing the strict metadata parsing when a model name is explicitly provided, we can support a wider range of standard checkpoints.