Skip to content

Custom Dataset model testing with mobilenet_v2 issue #1544

Answered by Ezra-Yu
payal211 asked this question in General
Discussion options

You must be logged in to vote

you can try:

>>> from mmpretrain import ImageClassificationInferencer
>>> inferencer = ImageClassificationInferencer(
            model='configs/your_mobilenet_v2.py',
            weights='YOUR_CHECKPOINT_PATH.pth',
            device='cuda',
            classes=['A', 'B', C'.....])
>>> inferencer(['demo/dog.jpg', 'demo/bird.JPEG'], show_dir="./visualize/")

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@payal211
Comment options

Answer selected by payal211
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants