Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

tagged all TODOs with issues on github (and created issues) #278

Merged
merged 10 commits into from
Apr 21, 2020
Merged

tagged all TODOs with issues on github (and created issues) #278

merged 10 commits into from
Apr 21, 2020

Conversation

maxkazmsft
Copy link
Contributor

No description provided.

Comment on lines -55 to -92
def readSEGY(filename):
"""[summary]
Read the segy file and return the data as a numpy array and a dictionary describing what has been read in.

Arguments:
filename {str} -- .segy file location.

Returns:
[type] -- 3D segy data as numy array and a dictionary with metadata information
"""

# TODO: we really need to add logging to this repo
print("Loading data cube from", filename, "with:")

# Read full data cube
data = segyio.tools.cube(filename)

# Put temporal axis first
data = np.moveaxis(data, -1, 0)

# Make data cube fast to acess
data = np.ascontiguousarray(data, "float32")

# Read meta data
segyfile = segyio.open(filename, "r")
print(" Crosslines: ", segyfile.xlines[0], ":", segyfile.xlines[-1])
print(" Inlines: ", segyfile.ilines[0], ":", segyfile.ilines[-1])
print(" Timeslices: ", "1", ":", data.shape[0])

# Make dict with cube-info
data_info = {}
data_info["crossline_start"] = segyfile.xlines[0]
data_info["inline_start"] = segyfile.ilines[0]
data_info["timeslice_start"] = 1 # Todo: read this from segy
data_info["shape"] = data.shape
# Read dt and other params needed to do create a new

return data, data_info
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this no longer needed?

@maxkazmsft maxkazmsft merged commit cf336ee into microsoft:correctness Apr 21, 2020
@maxkazmsft maxkazmsft deleted the tagtodo branch April 21, 2020 12:57
maxkazmsft added a commit that referenced this pull request May 21, 2020
* correctness branch setup (#251)

* created correctnes branch, trimmed experiments to Dutch F3 only

* trivial change to re-trigger build

* dummy PR to re-trigger malfunctioning builds

* reducing scope further (#258)

* created correctnes branch, trimmed experiments to Dutch F3 only

* trivial change to re-trigger build

* dummy PR to re-trigger malfunctioning builds

* reducing scope of the correctness branch further

* added branch triggers

* 214 Ignite 0.3.0 upgrade (#261)

* upgraded to Ignite 0.3.0 and fixed upgrade compatibility

* added seeds and modified notebook for ignite 0.3.0

* updated code and tests to work with ignite 0.3.0

* made code consistent with Ignite 0.3.0 as much as possible

* fixed iterator epoch_length bug by subsetting validation set

* applied same fix to the notebook

* bugfix in distributed train.py

* increased distributed tests to 2 batched - hoping for one batch per GPU

* resolved rebase conflict

* added seeds and modified notebook for ignite 0.3.0

* updated code and tests to work with ignite 0.3.0

* made code consistent with Ignite 0.3.0 as much as possible

* fixed iterator epoch_length bug by subsetting validation set

* applied same fix to the notebook

* bugfix in distributed train.py

* increased distributed tests to 2 batched - hoping for one batch per GPU

* update docker readme (#262)

Co-authored-by: maxkazmsft <maxkaz@microsoft.com>

* tagged all TODOs with issues on github (and created issues) (#278)

* created correctnes branch, trimmed experiments to Dutch F3 only

* trivial change to re-trigger build

* dummy PR to re-trigger malfunctioning builds

* resolved merge conflict

* flagged all non-contrib TODO with github issues

* resolved rebase conflict

* resolved merge conflict

* cleaned up archaic voxel code

* Refactoring train.py, removing OpenCV, adding training results to Tensborboard, bug fixes (#264)

I think moving forward, we'll use smaller PRs. But here are the changes in this one:

Fixes issue #236 that involves rewriting a big portion of train.py such that:

    All the tensorboard event handlers are organized in tensorboard_handlers.py and only called in train.py to log training and validation results in Tensorboard
    The code logs the same results for training and validation. Also, it adds the class IoU score as well.
    All single-use functions (e.g. _select_max, _tensor_to_numpy, _select_pred_and_mask) are lambda functions now
    The code is organized into more meaningful "chunks".. e.g. all the optimizer-related code should be together if possible, same thing for logging, configuration, loaders, tensorboard, ..etc.

In addition:

    Fixed a visualization bug where the seismic images where not normalized correctly. This solves Issue #217.
    Fixed a visualization bug where the predictions where not masked where the input image was padded. This improves the ability to visually inspect and evaluate the results. This solves Issue #230.
    Fixes a potential issue where Tensorboard can crash when a large training batchsize is used. Now the number of images visualized in Tensorboard from every batch has an upper limit.
    Completely removed OpenCV as a dependency from the DeepSeismic Repo. It was only used in a small part of the code where it wasn't really necessary, and OpenCV is a huge library.
    Fixes Issue #218 where the epoch number for the images in Tensorboard was always logged as 1 (therefore, not allowing use to see the epoch number of the different results in Tensorboard.
    Removes the HorovodLRScheduler class since its no longer used
    Removes toolz.take from Debug mode, and uses PyTorch's native Subset() dataset class
    Changes default patch size for the HRNet model to 256
    In addition to several other minor changes


Co-authored-by: Yazeed Alaudah <yalaudah@users.noreply.github.com>
Co-authored-by: Ubuntu <yazeed@yaalauda-dsvm-nd24.jsxrnelwp15e1jpgk5vvfmbzyb.bx.internal.cloudapp.net>
Co-authored-by: Max Kaznady <maxkaz@microsoft.com>

* Fixes training/validation overlap #143, #233, #253, and #259 (#282)

* Correctness single GPU switch (#290)

* resolved rebase conflict

* resolved merge conflict

* resolved rebase conflict

* resolved merge conflict

* reverted multi-GPU builds to run on single GPU

* 249r3 (#283)

* resolved rebase conflict

* resolved merge conflict

* resolved rebase conflict

* resolved merge conflict

* wrote the bulk of checkerboard example

* finished checkerboard generator

* resolved merge conflict

* resolved rebase conflict

* got binary dataset to run

* finished first implementation mockup - commit before rebase

* made sure rebase went well manually

* added new files

* resolved PR comments and made tests work

* fixed build error

* fixed build VM errors

* more fixes to get the test to pass

* fixed n_classes issue in data.py

* fixed notebook as well

* cleared notebook run cell

* trivial commit to restart builds

* addressed PR comments

* moved notebook tests to main build pipeline

* fixed checkerboard label precision

* relaxed performance tests for now

* resolved merge conflict

* resolved merge conflict

* fixed build error

* resolved merge conflicts

* fixed another merge mistake

* enabling development on docker (#291)

* 289: correctness metrics and tighter tests (#293)

* resolved rebase conflict

* resolved merge conflict

* resolved rebase conflict

* resolved merge conflict

* wrote the bulk of checkerboard example

* finished checkerboard generator

* resolved merge conflict

* resolved rebase conflict

* got binary dataset to run

* finished first implementation mockup - commit before rebase

* made sure rebase went well manually

* added new files

* resolved PR comments and made tests work

* fixed build error

* fixed build VM errors

* more fixes to get the test to pass

* fixed n_classes issue in data.py

* fixed notebook as well

* cleared notebook run cell

* trivial commit to restart builds

* addressed PR comments

* moved notebook tests to main build pipeline

* fixed checkerboard label precision

* relaxed performance tests for now

* resolved merge conflict

* resolved merge conflict

* fixed build error

* resolved merge conflicts

* fixed another merge mistake

* resolved rebase conflict

* resolved rebase 2

* resolved merge conflict

* resolved merge conflict

* adding new logging

* added better logging - cleaner - debugged metrics on checkerboard dataset

* resolved rebase conflict

* resolved merge conflict

* resolved merge conflict

* resolved merge conflict

* resolved rebase 2

* resolved merge conflict

* updated notebook with the changes

* addressed PR comments

* addressed another PR comment

* uniform colormap and correctness tests (#295)

* correctness code good for PR review

* addressed PR comments

* added data dumps to the code

* all dumps work properly now

* fixed build error, added binary dataset

* done - now need to test

* finished dev build script

* updates to tests to run on local machine as well we build

* updated gradient direction in gen_checkerboard

* increased Dutch F3 timeout

Co-authored-by: yalaudah <yazeed.alaudah@microsoft.com>
Co-authored-by: Yazeed Alaudah <yalaudah@users.noreply.github.com>
Co-authored-by: Ubuntu <yazeed@yaalauda-dsvm-nd24.jsxrnelwp15e1jpgk5vvfmbzyb.bx.internal.cloudapp.net>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants