@LogWell found a solution how to prepare DATASETS. You can use following files structure:
See original GitHub issue@LogWell found a solution how to prepare DATASETS. You can use following files structure:
datasets/CIHP/images/0002190.png
datasets/CIHP/list/img_list.txt
datasets/CIHP/images/tool/logwell_script.m
datasets/CIHP/images/edges
datasets/CIHP/images/labels
where datasets/CIHP/images/0002190.png - it’s a source image
datasets/CIHP/list/img_list.txt contain following data:
0002190.png
and datasets/CIHP/images/tool/logwell_script.m - it’s a MATLAB script for prepare edges and labels:
clear;
close all;
fclose all;
%%
imglist = '../list/img_list.txt'; % 00000.png
list = textread(imglist, '%s');
for i = 1:length(list);
imname = list{i};
instance_map = imread(fullfile('../images', imname));
instance_contour = uint8(imgradient(rgb2gray(instance_map)) > 0);
imwrite(instance_contour, fullfile('../edges', imname));
imwrite(instance_contour, fullfile('../labels', imname));
end
Just run this script using command like:
/opt/MATLAB/R2018b/bin/matlab -nodisplay -nojvm -nosplash -nodesktop -r "try, run('tool/logwell_script.m'), catch, exit(1), end, exit(0);"
and after that you can run
python test_pgn.py
for get segmented images.
_Originally posted by @rcrvano in https://github.com/Engineering-Course/CIHP_PGN/issues/26#issuecomment-496198813_
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:21
Top Results From Across the Web
How do I read data into R? | SAMHDA
Whether the data was prepared using Excel (in CSV, XLSX, or TXT format), SAS, Stata, SPSS, or others, R can read and load...
Read more >Preparing a dataset based on file data - Amazon QuickSight
Open a text file dataset for preparation by choosing one of the following options: Create a new Microsoft Excel dataset, and then choose...
Read more >Three Ways of Storing and Accessing Lots of Images in Python
In this tutorial, you'll cover three ways of storing and accessing lots of images in Python. You'll also see experimental evidence for the...
Read more >Get started with big data file shares—Documentation | ArcGIS ...
When using a big data file share for the input to a ArcGIS GeoAnalytics Server tool, you can browse for the item to...
Read more >Load a dataset - Hugging Face
Begin by creating a dataset repository and upload your data files. Now you can use the load_dataset() function to load the dataset. For...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I write a python script to prepare the data, maybe you want to try it https://gist.github.com/qzane/4d07b7551914f97f2bf8b9c79138ab14
@gayalkuruppu I don’t think you need labels to get the correct output. I created a folder with custom images, ran the python script that was linked to in a previous comment (https://gist.github.com/qzane/4d07b7551914f97f2bf8b9c79138ab14 and I saved it as prepare_dataset.py) with
and it created a new folder within datasets/ called CIHP (it’ll be named whatever you use as the last argument in the previous python command).
The new folder has the structure
and then I was able to run
python test_pgn.py
and see the results in CIHP_PGN/output/cihp_parsing_maps/