Closed Kashu7100 closed 2 years ago
Remove ./build and re-install. This solved the problem for me.
@zyong812 Where is ./build in directory
Created by python setup.py build develop --user
@neerajdr
@zyong812 How did you resolve this issue
I am getting isssue
/content/GLIP/maskrcnn_benchmark/engine/predictor_glip.py in overlay_entity_names(self, image, predictions, names, text_size, text_pixel, text_offset, text_offset_original) 345 346 cv2.putText( --> 347 image, s, (int(x), int(y)-text_offset_original), cv2.FONT_HERSHEY_SIMPLEX, text_size, (self.color, self.color, self.color), text_pixel, cv2.LINE_AA 348 ) 349 previous_locations.append((int(x), int(y)))
AttributeError: 'GLIPDemo' object has no attribute 'color'
@neerajdr I too had this issue; I surmise it may have to do with when the colab was published versus the current code.
Anyhow, there's probably a better way, but you can hack your way around this problem (and see some quick results at least) by inserting self.color = 255
at the beginning of method run_on_web_image
of class GLIPDemo
in file maskrcnn_benchmark/engine/predictor_glip.py
At least that will get you some white boxes to look at.
E.g., here's a diff:
index 6d28576..1fda54a 100644
--- a/maskrcnn_benchmark/engine/predictor_glip.py
+++ b/maskrcnn_benchmark/engine/predictor_glip.py
@@ -137,6 +137,7 @@ class GLIPDemo(object):
thresh=0.5,
custom_entity = None,
alpha = 0.0):
+ self.color = 255
predictions = self.compute_prediction(original_image, original_caption, custom_entity)
top_predictions = self._post_process(predictions, thresh)
Please refer to #31 for a quick fix, thanks!
Created by
python setup.py build develop --user
@neerajdr
Hello, I have the same issue. Sorry do you mind specifying what does it mean by re-installation? like re-run the following 3 command?
pip install einops shapely timm yacs tensorboardX ftfy prettytable pymongo
pip install transformers
python setup.py build develop --user
Thank you for sharing this interesting work. When I try to run the Colab example, the execution of 6th cell of the notebook resulted in the following error.
Here is the GPU information that I used:
Any advice is appreciated.
Sincerely,