Comments (3)
Hi,
I have the same issue.
Did you find a solution @tkrwy ?
Thanks!
from msifromhe.
I used this code last year, as for some time I was reproducing these results: This might give a clue what you can do ... depends how you want to organize your data.
I am not using Matlab anymore, so can't provide a well-tested function, but just to get a clue, you can use/modify it as per your needs
%% COPY IMAGE TILES TO TRAIN AND TEST FOLDERS
mkdir('E:\STAD_MSI_Project\DX_TILES_NORM_SPLIT\TRAIN\MSIMUT')
mkdir('E:\STAD_MSI_Project\DX_TILES_NORM_SPLIT\TEST\MSIMUT')
mkdir('E:\STAD_MSI_Project\DX_TILES_NORM_SPLIT\TRAIN\MSS')
mkdir('E:\STAD_MSI_Project\DX_TILES_NORM_SPLIT\TEST\MSS')
%% now copy the files to the actual folder. This might take a while.
if doCopy
moveImagesToFolder(cliniPatient, allTileNames, msitrain,cnst.tileInputPath,cnst.tileOutputPath,'msitrain')
moveImagesToFolder(cliniPatient, allTileNames, muttrain,cnst.tileInputPath,cnst.tileOutputPath,'muttrain')
moveImagesToFolder(cliniPatient, allTileNames, msstrain,cnst.tileInputPath,cnst.tileOutputPath,'msstrain')
moveImagesToFolder(cliniPatient, allTileNames, msitest,cnst.tileInputPath,cnst.tileOutputPath,'msitest')
moveImagesToFolder(cliniPatient, allTileNames, muttest,cnst.tileInputPath,cnst.tileOutputPath,'muttest')
moveImagesToFolder(cliniPatient, allTileNames, msstest,cnst.tileInputPath,cnst.tileOutputPath,'msstest')
end
function moveImagesToFolder(cliniPatient, allTileNames, patientSet,tileInputPath,tileOutputPath, setStr)
% if strcmp(setStr, 'msitrain') || strcmp(setStr, 'muttrain')
% moveTo = [tileOutputPath, 'TRAIN\MSIMUT'];
% end
% if strcmp(setStr, 'msitest') || strcmp(setStr, 'muttest')
% moveTo = [tileOutputPath, 'TEST\MSIMUT'];
% end
% if strcmp(setStr, 'msstrain')
% moveTo = [tileOutputPath, 'TRAIN\MSS'];
% end
% if strcmp(setStr, 'msstest')
% moveTo = [tileOutputPath, 'TEST\MSS']';
% end
moveTo = 'E:\STAD_MSI_Project\DX_TILES_NORM_SPLIT\TEST\MSS';
lin_ind = find(patientSet == 1); % whether msitrain, msitest or else*
for i=1:length(lin_ind)
currPat = cliniPatient{lin_ind(i)};
matchedTiles = find(contains(allTileNames,currPat) ==1); % match all tiles
tot_tiles = length(matchedTiles);
for j=1:tot_tiles
moveIt = allTileNames{matchedTiles(j)};
moveItFrom = [tileInputPath, moveIt];
movefile(moveItFrom, moveTo)
end
end
end
from msifromhe.
Thank you for your insight @mbhahsmi !
from msifromhe.
Related Issues (9)
- undefined function 'getTrainingOptions' HOT 1
- Undefined variable resnet18
- undefined function 'splitEachLabel' HOT 1
- Undefined function Info2MPPrescue() HOT 6
- Undefined predIsMSIMUTScore
- How are the labels (MSI vs. MSS) of TCGA image tiles determined?
- Warwick color normalization not accessible anymore
- info on meta data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msifromhe.