-
Notifications
You must be signed in to change notification settings - Fork 8k
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
How to make the changes in darknet_images.py
work?
#8615
Comments
darknet_images.py
work? darknet_images.py
work?
When I changed |
Hello @LeongVan ! I'm not sure. So, we will solve this problem with collaboration I guess 😄. I think you misunderstand the way Makefile works. If I'm not wrong Makefile builds the c and cpp files instead of python files. So when you change something in python and build it again the So, If you want to apply the changes to the python file you need to use a python script that calls darknet_images.py but If you want to use |
Thanks! I think you're right with how |
Yes, I finally solved the problem @LeongVan ! You can use the #8622 branch with
If you are curious about my adventure you can read below 🥳 I dig it up a little bit and I found a code block that checks the -save_labels flag.
after that I looked the code and try to find where we assign the dets array. Then I found out there is a function which is creating bounding boxes.
Then as you can see It calls another function 🤣 and FINALLY we can find the main code in
Then I realize this isn't what they want LoL 😭 So I look at the
Then I refactored the whole You can find the refactored code blocks from |
BRILLIANT!!! |
I want to get the original coordinates of detected objects. Firstly, I used the command below.
And I got a
.txt
file in the same directory with source image indata/images/test4.png
nameddata/images/test4.txt
, and it looks like below.But I want original coordinates of the objects (the pixel coordinates, before scaled), so I change the source code of writing function called
save_annotations
andconvert2relative
indarknet_images.py
, showing as below.Then, I saved the code file and ran
make clean
andmake -j
commands in terminal. After these, I deletedata/images/test4.txt
and ran the command below again.But I got the same result as I changed the code before. How can I make my changes work so that I can get original coordinates of the detected objects?
Appreciate any attempts and answers!
The text was updated successfully, but these errors were encountered: