suinleelab / cxr_covid

Code for paper "AI for radiographic COVID-19 detection selects shortcuts over signal"
Other
29 stars 7 forks source link

Update make_csv.py #4

Open Nlin2 opened 3 years ago

Nlin2 commented 3 years ago

include these into series_description_map:

'TORAX  AP': 'AP',
'TÓRAX AP': 'AP',
'TORAX BIPE AP': 'AP',
'W034 TÓRAX LAT': 'LAT',
'W033 TÓRAX P.A.': 'PA',

Add another exception to series_description:

try:
    series_description = metadata['0008103E']['Value'][0]
except Exception as e:
    try:
        series_description = metadata['00081032']['Value'][0]['00080104']['Value'][0]
    except Exception as e:
        try:
            series_description = metadata["00185101"]["Value"][0]
        except Exception as e:
            raise e