Git Product home page Git Product logo

videosearch's Introduction

videosearch

Large-Scale Video Retrieval Using Image Queries

By André Araujo, in collaboration with Jason Chaves, David Chen and Haricharan Lakshman

Image, Video and Multimedia Systems Group, Stanford University

This project currently contains code for

  • Keyframe extraction from videos
  • Shot boundary detector for videos
  • SIFT descriptor extraction per image/frame
  • Global descriptor extraction (Fisher Vectors) per image/frame, shot or scene
  • Bloom filter indexing per scene (video clip) -- see here
  • Retrieval in image or video databases using image queries
  • Evaluating retrieval results based on Average Precision and Precision at 1

With these, you can reproduce the main results from the papers mentioned below, following the steps outlined in the next section.

This repository can also be useful if one is interested in searching a database of images using query images. In that case, one can simply use the frame-based techniques described below.

Our implementation has been tested on Linux (Ubuntu) and Mac OS X.

For any questions or issues, feel free to get in touch.

Quick start

Here we illustrate the usage of this repository's code by running through a simple example containing 4 database video clips and two image queries. This also serves as a way to make sure your code is working properly.

Prerequisites: (all of these can be easily obtained for Ubuntu or OS X using 'apt-get install' or 'brew install' respectively)

  • opencv (tested with version 2.4.0 on Ubuntu, and version 2.4.12 on OS X)
  • ffmpeg (tested with version git-2012-08-24-fef9e84 on Ubuntu, and version 2.6.1 on OS X)
  • pkg-config (tested with version 0.25 on Ubuntu, and version 0.28 on OS X)

Step 1: Clone repository (where mypath is the path you'll download the repository to):

cd $mypath
git clone https://github.com/andrefaraujo/videosearch.git

Step 2: Building VLFEAT library:

cd $mypath/videosearch/common/vlfeat-0.9.18/
make

Step 3: Building YAEL library:

cd $mypath/videosearch/common/yael_v260_modif/
./configure.sh
cd yael
make

Step 4: Extract keyframes from test database videos:

cd $mypath/videosearch/indexer/keyframes
./run_keyframe_extraction_test.sh

Step 5: Build shot boundary detector and extract shot boundaries for test database videos:

cd $mypath/videosearch/indexer/shot_detector
make
./run_shot_detector_test.sh

Step 6: Build SIFT extractor and extract SIFT for each keyframe in database:

cd $mypath/videosearch/indexer/local_descriptors/
make
./run_sift_extraction_test.sh

Step 7: Build global descriptor extractors and extract global descriptors per frame, shot and scene:

cd $mypath/videosearch/indexer/global_descriptors/
make
    
# Extract frame-based global descriptors (GD)
./run_frame_based_index_test.sh # extract GDs for each clip
./run_join_frame_based_index_test.sh # join all GDs in one index
    
# Extract shot-based global descriptors (GD) with mode LOC
./run_shot_based_index_mode_1_test.sh # extract GDs for each clip
./run_join_shot_based_index_mode_1_test.sh # join all GDs in one index
./run_process_shot_files_mode_1_test.sh # process auxiliary shot files for this mode

# Extract shot-based global descriptors (GD) with mode INDEP
./run_shot_based_index_mode_0_test.sh # extract GDs for each clip
./run_join_shot_based_index_mode_0_test.sh # join all GDs in one index
./run_process_shot_files_mode_0_test.sh # process auxiliary shot files for this mode
    
# Extract scene-based global descriptors (GD)
./run_scene_based_index_test.sh # extract GD for each clip
./run_join_scene_based_index_test.sh # join all GDs in one index
./run_process_scene_files_test.sh # process auxiliary scene files
./run_process_scene_rerank_files_test.sh # process auxiliary file for scene reranking

Step 8: Extract local descriptors (and optionally global descriptors) for query images (you need to do this before running retriever, which is the next step):

cd $mypath/videosearch/indexer/local_descriptors/
./run_sift_extraction_test_query.sh
# Optional: extract global descriptors
cd $mypath/videosearch/indexer/global_descriptors/
./run_query_index_test.sh

Step 9: Build retriever and run it for frame-, shot- and scene-based indexes:

cd $mypath/videosearch/retriever/
make

# Retrieve using frame-based global descriptors
./run_frame_test.sh

# Optional: Retrieve using frame-based global descriptors, using pre-computed query global descriptors
./run_frame_test_with_query_index.sh

# Retrieve using shot-based global descriptors, mode LOC
./run_shot_mode_1_test.sh

# Retrieve using shot-based global descriptors, mode INDEP
./run_shot_mode_0_test.sh

# Retrieve using scene-based global descriptors in first stage,
# then shot-based global descriptors in second stage
./run_scene_test.sh

Step 10: Evaluate retrieval results (calculate AP and p@1):

cd $mypath/videosearch/scoring/

# Evaluate frame-based results
./run_convert_frame_based_results_test.sh # converting results to scoreable format
./run_evaluate_frame_based_test.sh # calculating AP and p@1

# Optional: Evaluate frame-based results which used pre-computed query global descriptors
./run_convert_frame_based_results_test_query_index.sh # converting results to scoreable format
./run_evaluate_frame_based_test_query_index.sh # calculating AP and p@1

# Evaluate shot-based results, mode LOC
./run_convert_shot_based_mode_1_results_test.sh # converting results to scoreable format
./run_evaluate_shot_based_mode_1_test.sh # calculating AP and p@1

# Evaluate shot-based results, mode INDEP
./run_convert_shot_based_mode_0_results_test.sh # converting results to scoreable format
./run_evaluate_shot_based_mode_0_test.sh # calculating AP and p@1

# Evaluate scene-based results
./run_convert_scene_based_results_test.sh # converting results to scoreable format
./run_evaluate_scene_based_test.sh # calculating AP and p@1

After running the run_evaluate_* scripts, you should see the scores for each query and at the end the mean scores (mAP, mP@1). For this small example dataset, we get mAP = 1 and mP@1 = 1 for all of the cases illustrated above. You should obtain the same results if your code is working properly. The retrieval results of frame-based experiments using pre-computed query global descriptors (the "optional" commands above) should be exactly the same as those without pre-computation.

Indexing/Retrieving/Scoring using Hessian-Affine detector

The example above uses SIFT (DoG) detector + SIFT descriptor. Usually, the Hessian-Affine (HA) detector provides better retrieval performance, compared to the SIFT detector. In this section, we walk through an example using the HA detector (for the frame-based pipeline, but shot/scene-based results can also be obtained in a straightforward manner).

We'll use the HA detector from INRIA; the detector can be found here -- download the program named compute_descriptors_linux64 or compute_descriptors_mac, depending on your platform. Place the downloaded file under indexer/local_descriptors. Also, make sure netpbm is installed (see instructions here).

Step 1: Extract HesAff+SIFT descriptors for the test example. Edit the files indexer/local_descriptors/run_siftHesAff_extraction_test.sh and indexer/local_descriptors/run_siftHesAff_extraction_test_query.sh by setting the netpbm path to the variable NETPBM_BIN_PATH. Then, run:

cd $mypath/videosearch/indexer/local_descriptors
./run_siftHesAff_extraction_test.sh
./run_siftHesAff_extraction_test_query.sh

Step 2: Build global descriptors for database frames and query images. Edit the files indexer/global_descriptors/run_frame_based_index_test.sh, indexer/global_descriptors/run_join_frame_based_index_test.sh and indexer/global_descriptors/run_query_index_test.sh by setting the variable LD_MODE to 1. Then, run:

cd $mypath/videosearch/indexer/global_descriptors
./run_frame_based_index_test.sh
./run_join_frame_based_index_test.sh
./run_query_index_test.sh

Step 3: Run retriever. Edit the file retriever/run_frame_test_with_query_index.sh by setting the variable FEAT_MODE to 1. Then, run:

cd $mypath/videosearch/retriever/
./run_frame_test_with_query_index.sh

Step 4: Evaluate retrieval results. Edit the files scoring/run_convert_frame_based_results_test_query_index.sh and scoring/run_evaluate_frame_based_test_query_index.sh by setting the variable FEAT_MODE to 1. Then, run:

cd $mypath/videosearch/scoring/
./run_convert_frame_based_results_test_query_index.sh
./run_evaluate_frame_based_test_query_index.sh

You should obtain: Total Results: mAP = 1.000000, mP@1 = 1.000000.

Performing retrieval on the Stanford I2V dataset

Here we provide some scripts to use our programs and obtain results on the Stanford I2V dataset (Dataset page, Download link). For this to work, you need to download the dataset beforehand and follow the instructions (found here) for setting it up.

Extracting keyframes from entire Stanford I2V dataset:

cd $mypath/videosearch/stanford_i2v/indexer/
python extract_database_keyframes.py # Look at script for more details and for changing parameters

After extracting frames from the dataset, you can run through steps 5 to 10 above to index, retrieve and get results on the Stanford I2V dataset.

To score results obtained with the Stanford I2V dataset, you should use a file with a specific format (as explained in the scoring/*format*.txt files). We provide examples of such files (scoring/example*) and even helper conversion scripts if your system outputs results based on keyframes (scoring/convert*). To score Scene Retrieval and Temporal Refinement results (refer to our MMSys'15 paper for explanation of this terminology), respectively, do:

cd $mypath/videosearch/scoring
python evaluate_scene_retrieval.py example_scene_retrieval_results_file.txt light_dataset_public.txt 100
python evaluate_temporal_refinement.py example_temporal_refinement_results_file_frames.txt light_dataset_public.txt frames

Most often, when using this dataset, one is interested in Scene Retrieval results (i.e., retrieving the correct video clips), as in the ICIP'15 paper mentioned below.

Citation

If you use this code, please cite:

A. Araujo and B. Girod. "Large-Scale Video Retrieval Using Image Queries", in Transactions on Circuits and Systems for Video Technology, 2017 (Paper)

Bibtex:

@article{AraujoTCSVT2017,
author = {Araujo, A. and Girod, B.},
journal = {Transactions on Circuits and Systems for Video Technology},
number = {99},
title = {{Large-Scale Video Retrieval Using Image Queries}},
year = {2017}
}

If you use the Stanford I2V dataset, please cite:

A. Araujo, J. Chaves, D. Chen, R. Angst and B. Girod. "Stanford I2V: A News Video Dataset for Query-by-Image Experiments", in Proc. ACM Multimedia Systems, 2015 (Paper) (Slides)

Bibtex:

@inproceedings{AraujoMMSYS2015,
author = {Araujo, A. and Chaves, J. and Chen, D. and Angst, R. and Girod, B.},
booktitle = {Proc. ACM Multimedia Systems},
title = {{Stanford I2V: A News Video Dataset for Query-by-Image Experiments}},
year = {2015}
}

License

MIT (except for the pieces of code from other sources -- check their original licenses)

videosearch's People

Contributors

andrefaraujo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

videosearch's Issues

fast weighted hamming

Hey André,

I wonder how you have done the fast weighted hamming distance with pop_count and fast corr weights...
Is there any reference?

I googled weighted hamming distance , I got this paper: LEARNING WEIGHTED HAMMING DISTANCE FOR BINARY DESCRIPTORS..

But unlickiky.. I failed to relate it to your work...

Regards ..

Scoring

Good morning,

I have a question concerning the map results presented on "Large-Scale Query-by-Image Video Retrieval Using Bloom Filters" paper that uses the same code. MAP is @ 100 or @ 1? since in the "light_dataset_public.txt" ground truth results per query do not sum to 100. Same goes for "vb_light_dataset_public.txt". On the sample code you use scoring @1 from using the text files, that is clear.

On the "TEMPORAL AGGREGATION FOR LARGE-SCALE QUERY-BY-IMAGE VIDEO RETRIEVAL" paper in order to get the MAP@100, you mention "...compared to a baseline frame-based scheme that does not use asymmetric comparisons." in the end. Do you compare the raw frame descriptors (32d, 128d)? Binarized features comparison?

Thaks a lot,
Dimitris

videosearch for windows

Hello,

is it possible run videosearch in Windows on an easy way?

I've successfully built VLFEAT but I am facing some issues with YAEL during 'make', so I've downloaded YAEL's version for windows and compile it with Visual Studio.

Any suggestions will be appreciated!
Btw, congrats for this project!

Training trained_parameters but get a very low mAP

Hi @andrefarauj, I am trying to train trained_parameters, following #10. But I get a very low mAP and P@1 on the standford600k dataset. (about 0.1 mAP, and 0.26 P@1). I want to describe some details, and hope you can give me some advice about how to improve mAP.

  1. I first sampled about 20000 frame from the whole dataset, then gather all the local descriptors of the 20000 frames and shuffle them. After that sample about 150*20000 frames from all these local descriptors, and use the pca function in yael lib to reduce the 128 dim descriptor to 32 dim.
  2. Next, I use the gmm function in yael to train gmm. I set niter to 60, centroid to 512. It takes about 10 hours to train the gmm.
  3. For the corr_weights, I still use the old one.(sift.pre_alpha.0.50.pca.32.gmm.512.pre_alpha.0.50.corr_weights). Actually I am not quite sure whether this must also be regenerated. But since I am using the same sift descriptor, I think it is not the reason why the mAP is so low.
    Is there anything wrong in the whole process? Can you give me some advice? Thanks!

I

Thank you for your paper. I'm not sure not how to judge the similarity according the score.

How to generate trained parameters?

Hi.
There are a lot of trained parameters' files in the folder.(indexer/global_descriptors/trained_parameters)
I confused about How to generate trained parameters?
(ps:I am a Chinese student. My English is not very good and may not be clearly expressed.)
Thanks. : )

Error in the stage of

usr/bin/ld: extract.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:62: recipe for target 'extract' failed
make: *** [extract] Error 1

pre-trained weight of delg model

Hi @andrefaraujo, sorry to contact you in the ISSUE section, since there is no available email left on your profile. By the way,
thanks for your great work, I am a student who recently study technology of image matching. I want to do some experiments of transfer learning based on your
pre-trained delg model, but i got some bumps that the pre-trained models you have provided which are exported and inlcudes extra components
like pre-processing and post-processing module are not what i want, i am wondering pre-trained weights of the delg model. I have no resources
to training delg model from scratch, although the recipe of training you have already put out. I have tried to extract weights of the delg model downloaded from
https://storage.googleapis.com/delf/r50delg_gldv2clean_20200914.tar.gz“ by converting it to graph_def, and found names of variables of the model
different from model written in the file "def/python/training/model/delg_model.py", Backbone of the pre-trained model seem to be implemented by slim's resnet_v1_50.
I successfully got weights of the delg model and restored them, but when I was calculating distances of descriptors for a group of pairs of images,
I found results being incorrect. Anyway, It would be grateful if you could share the weights for delf/r50delg_gldv2clean model.
You can contact me on [email protected], I am looking forward to receiving your reply.

usage of the HA detector

**Hessian-Affine detector uses the netpbm image toolkit and when installed the netpdm and the depending libraries (djpeg for this particular setup), when trying to run the run_siftHesAff_extraction_test.sh i get some errors regarding the libnetpbm and undefined symbols.

any suggestions?
my error messages and library dependencies list are given below:**

_dimsam@iti-400:~/Dimitris/i2v/videosearch/indexer/local_descriptors$ ./run_siftHesAff_extraction_test.sh
time djpeg ../test_db/test_video_0_keyframes/000001.jpg | /usr/local/netpbm/bin/ppmtopgm | /usr/local/netpbm/bin/pnmnorm -bpercent=0.01 -wpercent=0.01 -maxexpand=400 | /usr/local/netpbm/bin/pamscale -pixels 786432 > ../test_db/test_video_0_keyframes/000001.pgm
/usr/local/netpbm/bin/pnmnorm: symbol lookup error: /usr/local/netpbm/bin/pnmnorm: undefined symbol: optParseOptions3
/usr/local/netpbm/bin/ppmtopgm: symbol lookup error: /usr/local/netpbm/bin/ppmtopgm: undefined symbol: ppm_allocrow
/usr/local/netpbm/bin/pamscale: symbol lookup error: /usr/local/netpbm/bin/pamscale: undefined symbol: optParseOptions3

dimsam@iti-400:/Dimitris/i2v/videosearch/indexer/local_descriptors$ ldd -r -d /usr/local/netpbm/bin/pnmnorm
linux-vdso.so.1 => (0x00007ffc0e7a9000)
libnetpbm.so.10 => /usr/lib/libnetpbm.so.10 (0x00007fa4f759c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa4f71d7000)
/lib64/ld-linux-x86-64.so.2 (0x0000555a28cd1000)
undefined symbol: pm_tell2 (/usr/local/netpbm/bin/pnmnorm)
undefined symbol: pm_seek2 (/usr/local/netpbm/bin/pnmnorm)
undefined symbol: pnm_allocrow (/usr/local/netpbm/bin/pnmnorm)
undefined symbol: optParseOptions3 (/usr/local/netpbm/bin/pnmnorm)
dimsam@iti-400:
/Dimitris/i2v/videosearch/indexer/local_descriptors$ ldd -r -d /usr/local/netpbm/bin/ppm
ppm3d ppmdist ppmlabel ppmrelief ppmtogif ppmtoneo ppmtorgb3 ppmtv
ppmbrighten ppmdither ppmmake ppmrough ppmtoicr ppmtopcx ppmtosixel ppmwheel
ppmchange ppmdmkfont ppmmix ppmshadow ppmtoilbm ppmtopgm ppmtoterm
ppmcie ppmdraw ppmnorm ppmshift ppmtojpeg ppmtopi1 ppmtotga
ppmcolormask ppmfade ppmntsc ppmspread ppmtoleaf ppmtopict ppmtouil
ppmcolors ppmflash ppmpat ppmtoacad ppmtolj ppmtopj ppmtowinicon
ppmdcfont ppmforge ppmquant ppmtoarbtxt ppmtomap ppmtopjxl ppmtoxpm
ppmddumpfont ppmglobe ppmquantall ppmtobmp ppmtomitsu ppmtoppm ppmtoyuv
ppmdim ppmhist ppmrainbow ppmtoeyuv ppmtompeg ppmtopuzz ppmtoyuvsplit
dimsam@iti-400:/Dimitris/i2v/videosearch/indexer/local_descriptors$ ldd -r -d /usr/local/netpbm/bin/ppmtopgm
linux-vdso.so.1 => (0x00007fff9cae9000)
libnetpbm.so.10 => /usr/lib/libnetpbm.so.10 (0x00007f8110d8e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f81109c9000)
/lib64/ld-linux-x86-64.so.2 (0x000055b9eb310000)
undefined symbol: pgm_allocrow (/usr/local/netpbm/bin/ppmtopgm)
undefined symbol: ppm_allocrow (/usr/local/netpbm/bin/ppmtopgm)
dimsam@iti-400:
/Dimitris/i2v/videosearch/indexer/local_descriptors$ ldd -r -d /usr/local/netpbm/bin/pamscale
linux-vdso.so.1 => (0x00007fffa23ce000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8163366000)
libnetpbm.so.10 => /usr/lib/libnetpbm.so.10 (0x00007f8163143000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8162d7d000)
/lib64/ld-linux-x86-64.so.2 (0x000055797d7cf000)
undefined symbol: pnm_createungammatransform (/usr/local/netpbm/bin/pamscale)
undefined symbol: pnm_unapplyopacityrown (/usr/local/netpbm/bin/pamscale)
undefined symbol: pnm_unnormalizeRow (/usr/local/netpbm/bin/pamscale)
undefined symbol: pnm_getopacity (/usr/local/netpbm/bin/pamscale)
undefined symbol: pnm_allocpamrown (/usr/local/netpbm/bin/pamscale)
undefined symbol: optParseOptions3 (/usr/local/netpbm/bin/pamscale)
undefined symbol: pnm_normalizeRow (/usr/local/netpbm/bin/pamscale)
undefined symbol: pnm_creategammatransform (/usr/local/netpbm/bin/pamscale)
undefined symbol: pnm_applyopacityrown (/usr/local/netpbm/bin/pamscale)_

Are there serveal too big array?

In the file named sift_extractor.cc.
vl_sift_pix* data = new vl_sift_pix[number_pixels*sizeof(vl_sift_pix)];//line 61 float* this_frame = new float[4*sizeof(float)];//line 170 float* this_descr = new float[128*sizeof(float)];//line 171
The size of them is it too big? Maybe it can do like that:
vl_sift_pix* data = new vl_sift_pix[number_pixels];//line 61 float* this_frame = new float[4];//line 170 float* this_descr = new float[128];//line 171
I'm coding my graduation project which refer to your project. I'm a little confused about this problem.

why descriptor doesn't work?

Hello, first of all thank you very much for your contribution. In your code, you use vlfeat to extract sift feature. now I want to acceleration sift feature extraction process. I use siftgpu algorithm of chang chang wu, and extrac sift feature of images both in database-all and database-queries successfully. but now i find the feature doesn't work well. When I use the vlfeat code to extract sift feature, the final search accuracy is 64%. But when I uses siftgpu to extract sift feature, the finally search accuracy is just 6%。can you give some suggestion about this? thank you very much. the database I use is Stanford I2V dataset.

Experimental Results

Hi Andre, thanks for the great work and for make the code available. This is not a code issue, but rather some questions about the last table (Table V) of your IEEE TCSVT article. In particular, the questions are about how some of the parameters were measured (I have used the 600k version of the SI2V dataset for my initial experiments):

  1. For mAP, I see that the scripts available in the /scoring/ directory already display the final scores. Are those the values you used in the article?

  2. For the latency, I also see some output displayed when the queries scripts are executed. Did you just take the average of all the queries? I got somewhat different results with my machine compared to the ones in Table V. For instance, results for the frame-based and scene-based approaches were, on average, 6.2s and 0.5s, respectively. For the bloom filter approach I have no idea how to measure the latency, since the retriever script works in a different manner. How did you measure the latency for the BF-PI approach?

  3. Finally, I guess the memory column (Table V) refers to the file size of the joined global descriptors of each approach, am I right? For the bloom filter approach, however, I am not sure how to calculate that because there is no 'join' script. How did you measure the memory results for the BF-PI approach?

Thanks!

test_dataset_ground_truth_local.txt ???

Hello, can I ask a question? I put a picture in test_query during the test. But the running result is wrong. The problem is in the file test_dataset_ground_truth_local.txt. I want to ask if this file is automatically updated with the query results. If you need to write it by yourself, it ’s not that you lose the meaning of this project

Result of SIFT is different from the VLFeat' SIFT in Matlab

Hi andrefaraujo,

I found the SIFT result of your sift_extractor.cc is a little different from the vl_sift.c in VLfeat. The follows is from vl_sift.c

          /* Save back with MATLAB conventions. Notice tha the input
           * image was the transpose of the actual image. */
          frames [4 * nframes + 0] = k -> y + 1 ;
          frames [4 * nframes + 1] = k -> x + 1 ;
          frames [4 * nframes + 2] = k -> sigma ;
          frames [4 * nframes + 3] = VL_PI / 2 - angles [q] ;

          if (nout > 1) {
            if (! floatDescriptors) {
              for (j = 0 ; j < 128 ; ++j) {
                float x = 512.0F * rbuf [j] ;
                x = (x < 255.0F) ? x : 255.0F ;
                ((vl_uint8*)descr) [128 * nframes + j] = (vl_uint8) x ;
              }
            } else {
              for (j = 0 ; j < 128 ; ++j) {
                float x = 512.0F * rbuf [j] ;
                ((float*)descr) [128 * nframes + j] = x ;
              }
            }
          }

But your sift_extractor.cc are as follows:

                /* compute descriptor */
                vl_sift_calc_keypoint_descriptor (filt, rbuf, k, angles [q]) ;

                this_frame [0] = k -> x ;
                this_frame [1] = k -> y ;
                this_frame [2] = k -> sigma ;
                this_frame [3] = angles [q];

                frames.push_back(this_frame);

                for (j = 0 ; j < 128 ; ++j) {
                    float x;
                    if (divide_512) {
                        x = rbuf [j] ;
                    } else {
                        x = 512.0F * rbuf [j] ;
                    }
                    this_descr [j] = x ;
                }
                descr.push_back(this_descr);

I think the result of your SIFT result will the same as the VLFeat' SIFT in Matlab if it is fixed by the vl_sift.c.

Error in SIFT extraction stage

Error in SIFT extraction stage:
usr/bin/ld: extract.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:62: recipe for target 'extract' failed
make: *** [extract] Error 1

I Basically work with matlab programming. Completely iam unaware of python, opencv and ubuntu. With this comparitive study my final stage of PhD completes. Kindly provide a Simple algorithm for your code so that i can reprogram in matlab or else kindly provide the results of your code on my dataset and looking forward for a favorable reponse of collaborative research.

Add -pthread to CPPFLAGS in the makefile

I use videosearch in LUbuntu 17.10. When I executed the step 6 by the Quick Start, it occur errors that undefined reference to symbol 'pthread_create@@GLIBC_2.2.5.

I have to add -pthread to CPPFLAGS in the makefile then it could make successfully.

opencv.hpp

step 5
main.cc:11:30: fatal error: opencv2/opencv.hpp

Getting makefile error

$ make
g++ -std=c++0x -O3 -g -Wall -fmessage-length=0 -c extract.cc
-o extract.o
g++ -std=c++0x -O3 -g -Wall -fmessage-length=0 -c sift_extractor.cc
-o sift_extractor.o
g++ -std=c++0x -O3 -g -Wall -fmessage-length=0 -c ../../common/feature_set/feature_set.cc
-o ../../common/feature_set/feature_set.o
g++ -std=c++0x -O3 -g -Wall -fmessage-length=0 -Wl,-rpath,'$ORIGIN'/../../common/vlfeat-0.9.18/bin/glnxa64 extract.o sift_extractor.o ../../common/feature_set/feature_set.o
-o extract -L../../common/vlfeat-0.9.18/bin/glnxa64/ -lvl pkg-config --cflags --libs opencv; \

/usr/bin/ld: extract.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:63: recipe for target 'extract' failed
make: *** [extract] Error 1

I am getting this error in while running make in mypath = ~/videosearch/videosearch/indexer/local_descriptors$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.