Giter Site home page Giter Site logo

Comments (14)

sankopay avatar sankopay commented on June 21, 2024 1

my problem was ridiculous!!!! the bin folder in PATH was wrong because i manually edited it for some other project into Cmake/bin and i just had to restore it back to mongodb/bin and it’s now solved im so sorry for all the trouble tho, but this solution was okay when i did run the mongod.exe from prompt after i solved the bin issue, thanks a lot for taking your time to solve my problem even though you must’ve got a crazy busy schedule, never forget your kindness sir! πŸ™πŸ»πŸ™πŸ»πŸ™πŸ»

from cbir-using-cdh.

sankopay avatar sankopay commented on June 21, 2024

I have noticed i only could import json files, and no success was achieved with the bson files, but in your code it initially calls the collection consisting bson files so i changed it into collection = client.coral3.metadata and put the db = ['C:/Users/acer/Desktop/CDH/Corel'], and i still get errors is there something i'm missing here?? this is the result when i ran it, it gives me error of 'distances', and i gotta add, i didn't run the "CDH.py" file, could that be the proble, because it did the reshape on Corel image dataset?
image

i'm still so naive in python and all about coding, and im trying really hard to grasp these stuff and i read the tutorials but then they didn't help me at all with this issue, i'm sorry for the inconvenience, i know you must be really busy to be answering me, but i really need your code for my image processing project about the image retrieval via the color histograms, and mine was although about CBIR via 'fuzzy' color histograms using k-means clustering algorithm but i just couldn't implement it myself so i chnaged the subject into what you have already implemented here, but i still got these issues with running it... i'd be very very grateful if you could please take a look and help me with it...
btw some necessary information, i use python 3.7 (x64), pymongo-3.10.1, mongodb compass community, and some mentioned docker for some issues so it's docker 4.2.0 as well if these information helps,
i have also imported the database and collection of the dump files via studio 3t and robot 3t, and the files are already there, but i dont know what might be the problem here...
image

*** and i may add could you please consider my semi-intermediate level of python and maybe if you thought there;s a problem that might put me in some challenge, please be kind to explain a lil bit simpler, thanks a lot in advance ***

from cbir-using-cdh.

AdityaShaha avatar AdityaShaha commented on June 21, 2024

So there are a few things that I think you might have done wrong:

  1. ] You probably have not restored the mongodump correctly. After doing that correctly, the CDH Database should look something like the image attached below. I have added more instructions in the README.md to make it clearer.
  2. ] Yes, you have to rename the images, but you don't have to manually do it. You can do it using python. The code for which is now added as a part of the Jupyter Notebook. Just make sure that you put all the images in the 10k dataset in the folder named Corel10k in the same folder in which you are executing the notebook.
    I think these things should fix the issue at hand. In case there are any more errors please feel free to reply to this thread. For me I was able to solve the issues that you were facing on my system. Kudos !

PS : Make sure that you do a git pull origin master before re-executing the notebook.

Screen Shot 2020-06-28 at 7 00 22 AM

from cbir-using-cdh.

sankopay avatar sankopay commented on June 21, 2024

thanks for the reply please don't close the thread, just give me a couple days please because im a bit busy with exams and it takes me time to try the solution and give some feedback, but thanks anyway kind sir

from cbir-using-cdh.

sankopay avatar sankopay commented on June 21, 2024

but while we're at it, how did you add this collection cuz mongodb compass community only allows me to add json at a time or bson at a time, it's not like i can add both, and now i just reinstalled it and this is what i get
image

also see that if i want to restore your dump folder using studio 3t,
image
this was how i tried to restore the folder and this is what i get

image

i dont really know if im being naive here or not but i dont get what the real problem is here

from cbir-using-cdh.

AdityaShaha avatar AdityaShaha commented on June 21, 2024

There is an easy way to do this.

  1. Fire-up your terminal / command-prompt.
  2. cd to the folder where the dumps are stored. Like all the BSON/JSON Files.
  3. Run a simple command which the README.md has
cd dump/CDHCorel/
mongorestore --db db_name .

Explanation of the commands above

  • cd dump/CDHCorel/ will take you to the folder where the dumps are.
  • mongorestore --db db_name . : This command tells mongo to restore (basically add all the JSON/BSON files) to the database into the db_name which in yourcase is CDH and should be CDH and the . basically tells mongo the location of these JSON/BSON files.
    PS : Also make sure that you have your mongo-server running. You can do this by typing mongod in a separate command -prompt.
    Let me know if this works πŸ‘

from cbir-using-cdh.

sankopay avatar sankopay commented on June 21, 2024

the problem is that comand prompt doesn't know mongorestore at all, therefore i tried to manually add the database/collection

from cbir-using-cdh.

AdityaShaha avatar AdityaShaha commented on June 21, 2024

Can you please share the error here when you do mongorestore from the command-line ?

from cbir-using-cdh.

sankopay avatar sankopay commented on June 21, 2024

okay so let me go through this whole step with you once and for all to clarify it and not make any troubles for you anymore...

first i downloaded the image database and named it "Corel" with 10k images, put it into a folder and all those bson/json files as well and the pre-written code of yours, and then i have to run exactly this "cd dump/CDHCorel/ (which is already done with the command so i have to run the next command of db-name right?) mongorestore --db db_name . (and for this i dont have to replace db_name with Corel or anything right?) and then this is where it says the most common warning of (( 'mongorestore' is not recognized as an internal or external command, operable program or batch file.)) and i guess this is where my main problem lies on, i have run the robo 3t and have connected to my local server and have stored a CDH database with only the 2 json collection, so is it wrong anything i do in these things already?
is there a way i could twitch all these dump files or json/bson files and use the images directly or an easy way to all this????
sorry for the inconvenience and all the trouble already...

from cbir-using-cdh.

sankopay avatar sankopay commented on June 21, 2024

C:\Program Files\MongoDB\Server\4.2\bin>mongod
also i did this and the local server takes too long to repond, it's like this >

image

you told me to keep it running in the background while i do it, and then i shouldnt change the db = [] in the code right?
also i manually made the folder C:\data\db because the command of mongod wanted it, is that right? because the stackoverflow forum said so...

from cbir-using-cdh.

sankopay avatar sankopay commented on June 21, 2024

image

ok so update on the whole issue, i just copy pasted everything into desktop and boom! suddenly everything worked out fine but now i get this error please help me fix this too, why does it say it's out of range???

from cbir-using-cdh.

AdityaShaha avatar AdityaShaha commented on June 21, 2024

I think you have not pulled the latest GitHub version of the code. Did you do a git pull origin master before executing the code ?

from cbir-using-cdh.

sankopay avatar sankopay commented on June 21, 2024

im sorry but i dont know how to do that, i mean i just downloaded this git 2.27 and there's this command prompt in it, so i should just put "git pull origin master" that's all? or should i cd to the repository folder and then do it? but it wants a .git file but the repository only got a .gitgnore file, is that it???

from cbir-using-cdh.

AdityaShaha avatar AdityaShaha commented on June 21, 2024

So here is a quick video for you which can help
https://drive.google.com/file/d/1OCNhBWY64_ThMbYt4oQxqHsbJJC8JuqI/view?usp=sharing

from cbir-using-cdh.

Related Issues (3)

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.