Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple demo #26

Open
su850131 opened this issue Sep 26, 2023 · 5 comments
Open

Simple demo #26

su850131 opened this issue Sep 26, 2023 · 5 comments

Comments

@su850131
Copy link

Hi, Can you provide a simple demo? input 2 image and 2 mask, output all distances. Thank you!

@VlSomers
Copy link
Owner

Hi @su850131, you are right that this repository needs a simple demo like this.
However it will require some time to do something nice and I'm very busy right now.
I will provide a demo in late November when I will have more time.
In the meantime, you can have a look at issue #27 for tips to achieve this.

@su850131
Copy link
Author

OK, I will look at issue #27, thank you for your help.
I’m looking forward to your demo!

@mrsadeghi
Copy link

mrsadeghi commented Jan 11, 2024

Hi, thank you for your great job
Honestly, I am also waiting for your simple demo.
When I run your mentioned example in the main/torchreid/tools/feature_extractor.py file

Examples::

        from torchreid.utils import FeatureExtractor

        extractor = FeatureExtractor(
            model_name='osnet_x1_0',
            model_path='a/b/c/model.pth.tar',
            device='cuda'
        )

        image_list = [
            'a/b/c/image001.jpg',
            'a/b/c/image002.jpg',
            'a/b/c/image003.jpg',
            'a/b/c/image004.jpg',
            'a/b/c/image005.jpg'
        ]

        features = extractor(image_list)
        print(features.shape) # output (5, 512)

I got this error:

ImportError: cannot import name 'FeatureExtractor' from 'torchreid.utils'

@erictan23
Copy link

Hi, thank you for your great job Honestly, I am also waiting for your simple demo. When I run your mentioned example in the main/torchreid/tools/feature_extractor.py file

Examples::

        from torchreid.utils import FeatureExtractor

        extractor = FeatureExtractor(
            model_name='osnet_x1_0',
            model_path='a/b/c/model.pth.tar',
            device='cuda'
        )

        image_list = [
            'a/b/c/image001.jpg',
            'a/b/c/image002.jpg',
            'a/b/c/image003.jpg',
            'a/b/c/image004.jpg',
            'a/b/c/image005.jpg'
        ]

        features = extractor(image_list)
        print(features.shape) # output (5, 512)

I got this error:

ImportError: cannot import name 'FeatureExtractor' from 'torchreid.utils'

Its probably because there is no such module in torchreid.utils,
try this instead, from torchreid.tools.feature_extractor import FeatureExtractor

@Nas-Azzam
Copy link

Nas-Azzam commented Apr 16, 2024

Hi, thank you for your great job Honestly, I am also waiting for your simple demo. When I run your mentioned example in the main/torchreid/tools/feature_extractor.py file

Examples::

        from torchreid.utils import FeatureExtractor

        extractor = FeatureExtractor(
            model_name='osnet_x1_0',
            model_path='a/b/c/model.pth.tar',
            device='cuda'
        )

        image_list = [
            'a/b/c/image001.jpg',
            'a/b/c/image002.jpg',
            'a/b/c/image003.jpg',
            'a/b/c/image004.jpg',
            'a/b/c/image005.jpg'
        ]

        features = extractor(image_list)
        print(features.shape) # output (5, 512)

I got this error:
ImportError: cannot import name 'FeatureExtractor' from 'torchreid.utils'

Its probably because there is no such module in torchreid.utils, try this instead, from torchreid.tools.feature_extractor import FeatureExtractor

You can import "torchreid.reid.utils" I found it in env site-packages, have this structure torchreid>reid>model,utils etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants