maxfrei750 / paddle

Toolbox for the easy, deep learning-based primary particle size analysis of agglomerated, aggregated, partially sintered or simply occluded particles.
MIT License
10 stars 1 forks source link

Test with a custom image #6

Closed Rajarshi1001 closed 2 years ago

Rajarshi1001 commented 2 years ago

Could you please tell how can I test a custom .png file with this model?

maxfrei750 commented 2 years ago

paddle is not designed to analyze a single image, but rather a whole dataset of them. Therefore, you need to structure your input images in a dataset, so that paddle can work with them. The structure is as follows:

        root/
            subset/
                image_a.png
                image_b.png
                image_c.png
                ...
                classname1/
                    scores_a....csv
                    mask_a....png
                    mask_a....png
                    mask_a....png
                    ...
                    scores_b....csv
                    mask_b....png
                    mask_b....png
                    ...
                classname2/
                    scores_a....csv
                    mask_a....png
                    mask_a....png
                    mask_a....png
                    ...
                    scores_b....csv
                    mask_b....png
                    mask_b....png
                    ...
            subset2/
                ...
            ...

Starting at the root, you have multiple subsets (for the MPAC data set this would be test_s01, test_s02, etc.) In each subset you have the input images (starting with the prefix image_) and one folder for each class of the dataset (e.g. particle for the MPAC data set), which holds annotations in the form of binary masks. They can be empty for test data, where you don't have annotations. scores*.csv files are generally optional.

When you structured your data accordingly, you can process it using the three demos. Hope that helps.

maxfrei750 commented 2 years ago

Closing, since the problem seems to be resolved.