mirror of
https://github.com/opencv/opencv.git
synced 2026-09-13 22:08:50 -05:00
fixed save/load of dot; added data for the sample
This commit is contained in:
@@ -41,15 +41,15 @@ int main( int argc, char **argv )
|
||||
{
|
||||
if( argc != 1 && argc != 3 )
|
||||
{
|
||||
cout << "Format: base; " << endl << "or without arguments to use default data" << endl;
|
||||
cout << "Format: train_data test_data; " << endl << "or without arguments to use default data" << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
string baseDirName, testDirName;
|
||||
if( argc == 1 )
|
||||
{
|
||||
baseDirName = "../MultiScaleDOT/Data/train/";
|
||||
testDirName = "../MultiScaleDOT/Data/test/";
|
||||
baseDirName = "../../opencv/samples/cpp/dot_data/train/";
|
||||
testDirName = "../../opencv/samples/cpp/dot_data/test/";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -71,6 +71,9 @@ int main( int argc, char **argv )
|
||||
DOTDetector dotDetector;
|
||||
dotDetector.train( baseDirName, trainParams, true );
|
||||
|
||||
// dotDetector.save( "../../dot.xml.gz" );
|
||||
// dotDetector.load( "../../dot.xml.gz" );
|
||||
|
||||
const vector<string>& objectClassNames = dotDetector.getObjectClassNames();
|
||||
const vector<DOTDetector::DOTTemplate>& dotTemplates = dotDetector.getDOTTemplates();
|
||||
|
||||
|
||||
BIN
samples/cpp/dot_data/test/image_00002.png
Normal file
BIN
samples/cpp/dot_data/test/image_00002.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 490 KiB |
2
samples/cpp/dot_data/test/images.txt
Normal file
2
samples/cpp/dot_data/test/images.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
image_00002.png
|
||||
|
||||
BIN
samples/cpp/dot_data/train/black_coffee_cup/image_00000.png
Normal file
BIN
samples/cpp/dot_data/train/black_coffee_cup/image_00000.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 489 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
2
samples/cpp/dot_data/train/black_coffee_cup/images.txt
Normal file
2
samples/cpp/dot_data/train/black_coffee_cup/images.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
image_00000.png
|
||||
|
||||
7
samples/cpp/dot_data/train/objects.txt
Normal file
7
samples/cpp/dot_data/train/objects.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
black_coffee_cup
|
||||
#blue_bowl
|
||||
#blue_cup
|
||||
#nvidia_cup
|
||||
#rose_cup
|
||||
#white_bowl
|
||||
|
||||
Reference in New Issue
Block a user