title: ValueError: could not broadcast input array from shape (16,18,3) into shape (16)
body: <p>I was trying to instance segment my RGB images using <a href="https://pixellib.readthedocs.io/en/latest/Image_instance.html" rel="nofollow noreferrer">pixellib</a> library. However, I encountered the problem from segmentImage function. From stacktrace, I found the issue within init.py, and I have no idea why it needs to broadcast from 3D arrays to 1D. 20 Images from another folder I tried earlier didn't counter any of these.</p>
  <p>P.S. This was my first question on StackOverflow. if I miss any necessary details, please let me know.</p>
  <pre><code>for file in os.listdir(test_path):        
          abs_test_path = os.path.join(test_path, file)
          if file.endswith('.jpg'):
              filename = os.path.splitext(file)[0]
              if (os.path.isfile(abs_test_path)):
                  out_path = out_seg_path + filename
                  
                  segment_image.segmentImage(abs_test_path, show_bboxes=True,
                                             save_extracted_objects=True, 
                                             extract_segmented_objects=True)
                  im_0 = cv2.imread('segmented_object_1.jpg')
                  cv2.imwrite(out_path + '_1.jpg', im_0)
      
                  im_1 = cv2.imread('segmented_object_2.jpg')
                  cv2.imwrite(out_path + '_2.jpg', im_1)
  </code></pre>
  <p>This is my error</p>
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-4-835299843033&gt; in &lt;module&gt;
       15 
       16             segment_image.segmentImage(abs_test_path, show_bboxes=True,
  ---&gt; 17                                        save_extracted_objects=True, extract_segmented_objects=True)
       18 
       19 #             segment_image.segmentImage('segmented_object_1.jpg', show_bboxes=True, output_image_name=out_path + '_1.jpg',
  
  ~\anaconda3\envs\mask_rcnn\lib\site-packages\pixellib\instance\__init__.py in segmentImage(self, image_path, show_bboxes, extract_segmented_objects, save_extracted_objects, mask_points_values, output_image_name, text_thickness, text_size, box_thickness, verbose)
      762                         cv2.imwrite(save_path, extracted_objects)
      763 
  --&gt; 764                 extracted_objects = np.array(ex, dtype=object)
      765 
      766                 if mask_points_values == True:
  
  ValueError: could not broadcast input array from shape (16,18,3) into shape (16)
  </code></pre>