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

Inference on a NON annotated custom dataset #21

Open
ysig opened this issue Jun 29, 2020 · 3 comments
Open

Inference on a NON annotated custom dataset #21

ysig opened this issue Jun 29, 2020 · 3 comments

Comments

@ysig
Copy link

ysig commented Jun 29, 2020

I have all sorts of problems trying to simplify the code, so I can do inference on a custom dataset with NO annotations.
Is there an easy way you can do so?

Thanks

@LucaArietti
Copy link

I have the same issue. I want to use this detector on custom immage not annotated, but I have problems running the code.

@deandiakov
Copy link

A quick and dirty method is to go inside of the test_dataset method loop in detector.py and load in your own image from somewhere in the folder, convert to numpy, and then pass into the model:

        img = Image.open('./original.jpg')
        # convert image to numpy array
        data = np.asarray(img)
        r = model.detect([data], verbose=0)[0]

The results contain the bounding box and mask info which you can then use yourself. Or you can pass data into the visualizers as the first argument.

@LucaArietti
Copy link

thanks @deandiakov it works

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

3 participants