DeepForest icon indicating copy to clipboard operation
DeepForest copied to clipboard

Issue #569 fixed/Introduces 'path' as an alternative to 'raster_path'…

Open Abhishek-kumar0503 opened this issue 2 years ago • 9 comments

Issue #569 fixed

Abhishek-kumar0503 avatar Mar 05 '24 11:03 Abhishek-kumar0503

Thanks, running tests now.

bw4sz avatar Mar 18 '24 16:03 bw4sz

Thanks @Abhishek-kumar0503. As I noted in my overall review comment https://github.com/weecology/DeepForest/pull/617#pullrequestreview-1943695662 there are additional uses of raster_path that need to be updated and we need a test for this. Can you please add the test and then use it to check for other instances of raster_path that need to be changed.

ethanwhite avatar Mar 25 '24 16:03 ethanwhite

okay @ethanwhite I created the function name def test_predict_tile_with_projection and add it in test

def test_predict_tile_with_projection(m, raster_path):
    # test with projection enabled
    m.config["train"]["fast_dev_run"] = False
    m.create_trainer()
    prediction, projection = m.predict_tile(raster_path=raster_path,
                                            patch_size=300,
                                            patch_overlap=0.1,
                                            return_plot=False,
                                            keep_projection=True)
    
    assert isinstance(prediction, pd.DataFrame)
    assert set(prediction.columns) == {"xmin","ymin","xmax","ymax","label","score","image_path"}
    assert not prediction.empty
    
    assert isinstance(projection, pd.DataFrame)  # Assert that projection dataframe is returned 

and i check it then it fails. Can you tell where is issue in it

Abhishek-kumar0503 avatar Mar 31 '24 08:03 Abhishek-kumar0503

Thanks for adding the test. Have you tried debugging the resulting error? If so, where did you get stuck?

ethanwhite avatar Apr 01 '24 12:04 ethanwhite

ya it give error in unnecessary data type keep_projection. Solved!

Abhishek-kumar0503 avatar Apr 13 '24 16:04 Abhishek-kumar0503

Great! Can you rebase this to remove the merge conflicts and then I'll give it another look

ethanwhite avatar Apr 16 '24 13:04 ethanwhite

@ethanwhite it give error in check style. Can you help me to solve this issue.

Abhishek-kumar0503 avatar Apr 28 '24 11:04 Abhishek-kumar0503

@Abhishek-kumar0503 - try running this locally:

yapf -i --recursive deepforest/ --style=.style.yapf

That should cleanup the style issue.

ethanwhite avatar Apr 28 '24 13:04 ethanwhite

yeah,thanks it worked

Abhishek-kumar0503 avatar Apr 30 '24 11:04 Abhishek-kumar0503

Closing due to inactivity. Feel free to reopen if you return to this.

ethanwhite avatar Aug 04 '24 16:08 ethanwhite