Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

Add corrupted file check to pipeline #4

Open
dunnkers opened this issue Jul 25, 2019 · 0 comments
Open

Add corrupted file check to pipeline #4

dunnkers opened this issue Jul 25, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@dunnkers
Copy link
Owner

We might want to check for corrupted files, in order to identify possible pipeline congestion. Validation code:

    for i in range(len(sv.files)):
        try:
            im=sv[i]
        except Exception:
            print('rm',sv.files[i])

We could add this after caching, or when transforming. Here for example, where we first actually read the images: (if an image is corrupted an error will first show up here.)

bsc-thesis/src/transform.py

Lines 144 to 151 in 312da72

# Convert image collections to array
print(' Converting image collections to arrays...')
start = time()
gt_arr = np.array(gt)
sv_arr = np.array(sv)
usv_arr = np.array(usv)
end = time()
print(' Converted to arrays in {}'.format(timedelta(seconds=end - start)))

@dunnkers dunnkers added the enhancement New feature or request label Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant