-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
computeSaliency does not get correct results #164
Comments
Hi @justinkoo , I am the author of the saliency module. BING algorithm works well, I checked with several tests and was also used by another research group. I think you have misunderstood its functioning: BING, instead of proposing all windows possible that you would have if you apply classical sliding window object detection paradigm, produces a small set of candidate object windows. Among them, there is certainly the target of interest. This subset, can be given as input to other algorithms of detection etc, making the job much simpler and less computationally expensive. In the example that I have inserted in the module, I have highlighted only the rectangles corresponding to the target, to highlight that among the candidates proposed by BING there are always those that you were looking for. Generally, although the proposals vary between 2000 and 5000 candidates, you can find the target of interest in the first 100-200 positions. |
Hi @fpuja ,Sorry for replying so late. So as you said that the code has been tested and can get the right results, then the problem may come from the way i use it. anything wrong with the way i using this code? |
Hi @justinkoo , sorry you for replying so late. Well, looking at your procedure, the pipeline to run the code it's ok, but you must NOT unpack the .gz, you must collocate in the folder the .gz file directly. This format is designed to save space, and the code is already enabled to make the reading in this format. So now you can try again the code, but N.B. as I have wrote in the previous answer: the algorithm give as output 2k-5k bounding box, among which there are your target of interest. |
Hi@fpuja,I have spent some time to read the paper of this code and test its accompanying code ,the result is similar as the module packaged by you. |
Hi @justinkoo , I also performed tests using my code and their and the results are the same :) |
anyway @justinkoo, if you have further doubts about the theory of the algorithm, perhaps should write directly to the author, with whom I had an email exchange and is very friendly and helpful. :) If then you will also contribute to my module maybe adding another objectness or object detection algorithm, I would be really glad! :) |
thanks @fpuja ,if i have time ,i will have a try^-^ |
Hi @fpuja,
And the running time for an image:
|
@antran89 i tried running your code but its giving me errors: /home/raman/Work/obj_prop_3D/main.cpp:172: error: undefined reference to `cv::saliency::ObjectnessBING::setTrainingPath(std::string)' /home/raman/Work/obj_prop_3D/main.cpp:185: error: undefined reference to `cv::saliency::Saliency::computeSaliency(cv::_InputArray const&, cv::_OutputArray const&)' etc. i changed the model training path correctly. ANy idea why this is happening? |
Hi @ramanpreet9, I think this closed issue is not the correct place to write, because you have not problem with algorithm results, you have a building errors and, as you know, is very different :) Your building problems are not due to wrong model training path, you have problem with open cv library and my module. If you are on UNIX sistem, check that you are using or you have linked the correct open cv and open cv contrib correct folder |
Sorry about posting here.. i didnt realize the thread was closed. I double checked my links. I think the problem is that your implementation in opecv_contrib has been edited a bit which isnt letting us compile the program correctly. Another frien dof mine is having same issue with ObjectnessBING as well. Will it be possible for you to provide a sample code that takes an image and runs bing on it returning say 1000 bounding boxes along with its value on the opencv 3.0 (with bing in opencv_contrib part) ? |
Sorry but ,trust me , you are thinking wrong :) My module on opencv_contrib has no problem, otherwise it would be not on opencv_contrib ;) I you are not a neophyte on OpenCV stuff and community, you know that a module, or proposed change on a module, are merged in a opencv or opencv_contrib only after passing different steps, the first of which is to pass a cross platform building. So again, trust me, the problem is on your machine :) You have problems with opencv configuration - linking - including. Resolve this problem and all works well ;) best |
ok, perhaps you are right =). For my cmake file this is what i have: find_package(PCL REQUIRED COMPONENTS common io) include_directories({/home/raman/Work/obj_prop_3D}) find_package(OpenCV 3.1.0 REQUIRED COMPONENTS core highgui imgproc imgcodecs) add_executable(${PROJECT_NAME} ${project_SOURCES}) target_link_libraries(obj_prop_3D ${PCL_LIBRARIES} ${OpenCV_LIBS} ) ` should i be adding something extra? |
Reflect on the commented line in your cmake. Why opencv include and install path are commented? E why the include_directories? |
I am entirely new to opencv, cmake files etc. So most of what i have done is through SO, github threads and some ROS related stuff. i uncommented that line and edded -lopencv_contrib but it didnt work either. Regarding the commented lines earlier: I had commented them out to put it in a pcl related thread as the issue was related to pcl. I forgot to uncomment them to link here. =) My mistake. they are all uncommented now and the updated cmake is here: "project(obj_prop_3D) find_package(PCL REQUIRED COMPONENTS common io) include_directories({/home/raman/Work/obj_prop_3D}) find_package(OpenCV 3.1.0 REQUIRED COMPONENTS core highgui imgproc imgcodecs ) add_executable(${PROJECT_NAME} ${project_SOURCES}) target_link_libraries(obj_prop_3D ${PCL_LIBRARIES} ${OpenCV_LIBS} ) " |
pkg-config --libs opencv returned: -L/usr/local/lib -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_viz -lopencv_core so perhaps i need to add contrib manually? |
Yes you must do different thinks. Sorry but I can't give you a step by step guide on a openCV installation /configuration, I must work ahah :) This issues are only related to problem with my module. For the opencv configuration problem, you can find many tutorials and posts on line ;) Good luck, best |
Hi @antran89, I don't remember the paper's declared speed, it's been too long since time since I port/implement the algorithm, bu two points:
2)I'm not the author or coauthor of paper, so this is my porting/implementation of algorithm for OpenCV; I've never declare that the current implementation have the same speed as the paper declared speed. Best |
i use BING as algorithm type to compute the boundingbox of an image, the sample project "computeSaliency" runs fine ,but the result is not ok, it gets too many boxes.
i painted the results on the source image ,like this
i compile opencv contrib with opencv 3.0, i wonder to know has anyone successfully run the example and get right results? what the problem may i meet?
The text was updated successfully, but these errors were encountered: