Baseline - LNDST

https://gitlab.aicrowd.com/aicrowd/practice-challenges/aicrowd_LNDST_challenge/raw/master/baselines/LNDST_baseline.ipynb

Lots of bugs in the baseline. Tried fixing them. Not sure about the following one though:

error                                     Traceback (most recent call last)

<ipython-input-45-dbabc75988a0> in <module>()
      3 print(test_image_path)
      4 img_plot = cv2.imread(test_image_path)
----> 5 img_plot = cv2.cvtColor(img_plot, cv2.COLOR_BGR2RGB)
      6 img = img_plot.reshape((1,3,400,400))
      7 img = torch.tensor(img).float()

error: OpenCV(4.1.2) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

Nevermind, fixed that now next error:

FileNotFoundError                         Traceback (most recent call last)

<ipython-input-54-81944cffa6a4> in <module>()
      5 submission_file_path = root+"submission.npy"
      6 main_array = []
----> 7 for i in range(len(os.listdir(output_mask_path))):
      8   image_name = "image_" + str(i) + ".jpg"
      9   gt_mask = output_mask_path + image_name[:-3] + "png"

FileNotFoundError: [Errno 2] No such file or directory: ''

Honestly just wanted to try a working baseline and see how to do this sort of task. Don’t feel like adding a loop to save the masks on top of the bugs i had to fix so far, because as i said all i wanted to do is have a look at a working model and then maybe tweak it. Maybe.

Hey,

Thanks for pointing out and sorry for the inconvenience caused due the errors. Have updated the baseline.

Regards
Ayush

1 Like