BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
crack3n-collab
Obsidian | Level 7

Running Jupyter Notebook and trying to load images and their labels but have come across errors trying to run the code.

https://github.com/michaelgorkow/SAS_DeepLearning/blob/master/Face_Mask_Detection/face_mask_detectio... 

The link above is the code from Git Hub.

 

Code:

crack3ncollab_0-1702026217333.png

 

 

error message:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_25351/1026304421.py in <module>
----> 1 object_detection_targets = create_object_detection_table_no_xml(conn=s,      2                                                                 data_path='/data/notebook/Face_Mask_Detection/training_images_augmented/',
      3                                                                 annotation_path='/data/notebook/Face_Mask_Detection/training_images_augmented/',
      4                                                                 coord_type='yolo',
      5                                                                 output='detTbl')

/opt/anaconda3/lib/python3.9/site-packages/dlpy/utils.py in create_object_detection_table_no_xml(conn, data_path, coord_type, output, annotation_path, image_size)
   2464                 label_files = [x for x in label_files if x.endswith('.txt')]
   2465         else:
-> 2466             label_files = conn.fileinfo(caslib=caslib_annotation, allfiles=True).FileInfo['Name'].values
   2467             label_files = [x for x in label_files if x.endswith('.txt')]
   2468 

/opt/anaconda3/lib/python3.9/site-packages/swat/cas/results.py in __getattr__(self, name)
    361         if name in self:
    362             return self[name]
--> 363         return super(CASResults, self).__getattribute__(name)
    364 
    365     def get_set(self, num):

AttributeError: 'CASResults' object has no attribute 'FileInfo'

I also don't understand how the images are accessed from jupyter notebook since the path of the image appears to have the images be uploaded to jupyter notebook then it can be accessed.

 

1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ
It looks like this code expects the .jpg and .txt files to be in that referenced path accessible to python, so if they aren't there I would not expect the code to work.
--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

4 REPLIES 4
gwootton
SAS Super FREQ
It looks like this code expects the .jpg and .txt files to be in that referenced path accessible to python, so if they aren't there I would not expect the code to work.
--
Greg Wootton | Principal Systems Technical Support Engineer
crack3n-collab
Obsidian | Level 7

Hi I am running another part of the code the image augmentation part but I have come across the exact same error. The same error pops up but I have checked the file path and the images all have the .jpg and .txt extensions.

 

https://github.com/michaelgorkow/SAS_DeepLearning/blob/master/Face_Mask_Detection/image_augmentation...

 

I don't understand the error

 

crack3ncollab_0-1704117081024.png

 

gwootton
SAS Super FREQ
Did the previous steps execute successfully? Is the path defined in "path" accessible to python?
--
Greg Wootton | Principal Systems Technical Support Engineer
crack3n-collab
Obsidian | Level 7

Did a little debugging and turns out the data format was wrong. The path was correct.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Discussion stats
  • 4 replies
  • 1277 views
  • 2 likes
  • 2 in conversation