Comments (8)
Maybe my installation instructions were not clear enough.
- wget http://www.robots.ox.ac.uk/~vgg/data/pets/data/images.tar.gz
- wget http://www.robots.ox.ac.uk/~vgg/data/pets/data/annotations.tar.gz
- tar xf images.tar.gz
- tar xf annotations.tar.gz
- mv annotations/xmls/* images/
- Change DATASET_FOLDER
- python3 generate_dataset.py (maybe also install imgaug if you want better results)
The file train.csv will now contain lines like this:
/home/lars/Downloads/images/Abyssinian_1.jpg,1,600,400,173,72,265,158
/home/lars/Downloads/images/Abyssinian_10.jpg,1,375,500,72,105,288,291
...
I hope now it works for you guys
from object-localization.
Hi, check whether you set the right path (DATASET_FOLDER) in generate_dataset.py. Did you use a new dataset or Oxford-IIIT? If you use a new dataset, you will have to change generate_dataset.py. The script train_model.py expects the following columns in the csv file: path, class_id, width, height, x0, y0, x1, y1
from object-localization.
Yes, I pasted the path of the dataset folder and used original dataset for now.
As an alternative, could you please upload train.csv and validation.csv here so I could have a look? I would really appreciate it!
from object-localization.
Hi Lars, I've the same problem of imthealphamale. why this problem?
thanks a lot.
Best regards.
from object-localization.
oh, yes..that's great! Now, it's work! Thank you so much, lars! last one thing, how I can use my gpu for training?How can I set it?
Best regards
from object-localization.
No problem, you can enter in the terminal python3 -c "from keras import backend as K; print(K.tensorflow_backend._get_available_gpus())" to check whether Keras uses your GPU. Otherwise you have to configure it. Normally, you don't have to set /device:GPU:0 manually.
from object-localization.
use this script to change xml files to single .csv files:
###code starts here###
import os
import glob
import pandas as pd
import xml.etree.ElementTree as ET
xml_list = []
for xml_file in glob.glob('C:/Users/-----/*.xml'): #enter the path of the xml folder
print("hi")
tree = ET.parse(xml_file)
root = tree.getroot()
for member in root.findall('object'):
print("hi")
value = (root.find('filename').text,
int(root.find('size')[0].text),
int(root.find('size')[1].text),
member[0].text,
int(member[4][0].text),
int(member[4][1].text),
int(member[4][2].text),
int(member[4][3].text)
)
xml_list.append(value)
column_name = ['filename', 'width', 'height', 'class', 'xmin', 'ymin', 'xmax', 'ymax']
xml_df = pd.DataFrame(xml_list, columns=column_name)
xml_df.to_csv('train_test.csv', index=None)
print('Successfully converted xml to csv.')
###code ends here###
from object-localization.
I get also an empty train.csv. Is this because the folder 'annotations' is not in the right directory? See image of my directories.
Okay it works! I had to move the annotations folder into the images folder. I used the commando 5. mv annotations/xmls/* images/ as in the instructions, but now it works!
from object-localization.
Related Issues (20)
- confusion in iou calculation HOT 2
- Program getting terminated after a particular error HOT 1
- TypeError: unsupported operand type(s) for -: 'tuple' and 'int' HOT 1
- Unable to open file (unable to open file: name = 'model-0.29.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) HOT 2
- IndexError: index 7 is out of bounds for axis 1 with size 7
- What if no ground truth available?
- Infer trained model on OpenVino
- FileNotFoundError: [Errno 2] No such file or directory: 'train.csv' HOT 1
- Model?
- How to get the picture class_name? HOT 3
- Dataset problem
- loss start too high
- What does STD and MEAN do? HOT 1
- Error message from evaluate_performance.py HOT 2
- Issue found from all the commits. Might be my tensorflow version issue? HOT 3
- train_model.py HOT 5
- Question: do not see images with bounding boxes as the output files. HOT 1
- some images are corrupted HOT 1
- Modifying the model for multi object localization in an image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from object-localization.