Skip to content

Inference for Detectron2 PointRend_X101-FPN_model #668

Answered by kadirnar
kaphleamrit2 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @kaphleamrit2,

Paste this code on line 551.

from detectron2.projects import point_rend
point_rend.add_pointrend_config(cfg)

Then you need to download these files and edit the file path.

Detect Code:

from sahi.model import Detectron2DetectionModel
from sahi.predict import get_sliced_prediction, predict, get_prediction
from sahi.utils.file import download_from_url
from sahi.utils.cv import read_image

image = download_from_url('https://raw.githubusercontent.com/obss/sahi/main/demo/demo_data/small-vehicles1.jpeg',
                  'demo_data/small-vehicles1.jpeg')

detection_model = Detectron2DetectionModel(
    model_path="model_final_edd263…

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by fcakyon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #410 on September 30, 2022 18:55.