Questions tagged [pixellib]
11 questions
5
votes
3 answers
PixelLib not detecting objects properly
libraries im using
import pixellib
from pixellib.instance import instance_segmentation
import cv2
import matplotlib.pyplot as plt
the script:
segment_image = instance_segmentation()
segment_image.load_model('mask_rcnn_coco.h5')
segmask, output =…

CLR
- 51
- 1
4
votes
1 answer
Pixellib - removing background takes huge processing
I am using Pixellib library in Python to detect a person and change its background, as shown in their example here.
It works flawlessly, but takes huge processing power on my laptop, coupled with their large (~150mb) pascalvoc model, thus rendering…

sppc42
- 2,994
- 2
- 31
- 49
1
vote
1 answer
UnboundLocalError: local variable 'raw_labels' referenced before assignment site:stackoverflow.com
i run this simple code but it give me error
import pixellib
from pixellib.semantic import semantic_segmentation
segment_video =…

Ahsan Bilal
- 11
- 1
1
vote
0 answers
[instance segmentation]pixellib fails to remove _background_ label in labelme on custom dataset
I learn pixellib to do instance segmentation at pixellib.
I used labelme to mark 4 categories of objects.According to the document of labelme, I used the label _background_ to mark the parts that do not belong to the object.
The 4 categories of…

CR7
- 125
- 7
0
votes
0 answers
Error: with dtype is deprecated and will be removed in a future version
Program exit with error:
ValueError: Layer #389 (named "mrcnn_bbox_fc"), weight has shape (1024, 324), but the saved weight has shape (1024, 8).
import tensorflow as tf
from…

sata mems
- 13
- 2
0
votes
0 answers
unable to open file: 'mask_rcnn_coco_h5' in pixellib python
This is my code (as per pixellib documentation)
import pixellib
from pixellib.instance import instance_segmentation
segment_image = instance_segmentation(infer_speed = "rapid"…
0
votes
0 answers
How can I blur edges after change background color to red of an image using pixellib Python
I have the following code that works great but it doesn't edges blur. I am using python and pixellib for change image background color.
How can I change blur the edges after change background color of the image?
from pixellib.tune_bg import…

reshma
- 1
0
votes
0 answers
downgrading to tensorflow = 2.4.0 conflicts with pixellib
I am running pixellib version 0.7.1 on Macos M1. It fails badly in image segmentation showing strange results. Some forums suggest downgrading tensorflow to 2.4.0. Here are the details from conda info:
active environment : mlp
active env…

Saman
- 23
- 4
0
votes
0 answers
How do I fix loading a weight file with an incorrect number of layers into a model when trying to make the gray background of an image white?
I'm making an image cropping program in python. After the images are cropped, images with a gray background need to be found and converted to a white background. There are passport photos of students in the pictures.
enter image description here
I…

melissa
- 3
- 1
0
votes
1 answer
Blur image background using pixellib and keep only one target object
I'm using the code below to blur the background.
change_bg = alter_bg(model_type="pb")
change_bg.load_pascalvoc_model("xception_pascalvoc.pb")
change_bg.blur_bg(filename, low=True, output_image_name=output, detect="car")
It works, but I need to…

fcberg
- 764
- 13
- 29
-1
votes
3 answers
ValueError: You are trying to load a weight file containing 293 layers into a model with 147 layers
If you are getting this error while following the code from this tutorial
https://pixellib.readthedocs.io/en/latest/image_ade20k.html
ValueError: You are trying to load a weight file containing 293 layers into a model with 147 layers

J33T
- 13
- 6