-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
rs_image_inference #3772
Comments
And if I want to superimpose my inference onto the original, how do I do that? |
i dont understand your question, but if u want to impose the inference on the original image you can use opacity config_file = 'pspnet_r50-d8_4xb2-40k_cityscapes-512x1024.py' config_file = 'segformer_mit-b2_8x1_1024x1024_160k_kitti.py'checkpoint_file = 'checkpoints/Segformer_B2.pth'Initialize the modelmodel = init_model(config_file, checkpoint_file, device='cuda:0') Load an imageimg = 'demo/image.png' # or img = mmcv.imread(img) Run inferenceresult = inference_model(model, img) Save and display the resultoutput_file = 'result.jpg' image = cv2.imread(output_file) plt.figure(figsize=(10, 10)) |
thanks. |
|
Why the result is black when I use this.
The text was updated successfully, but these errors were encountered: