This repository created to train a model and detect an underwater object using tensorflow API.
1. Install tensorflow
sudo apt update
sudo apt install python3-dev python3-pip
pip3 install --user --upgrade tensorflow
3. Use labelimg to label images.
pip3 install labelImg
4. Run xml2csv script to convert xml files.
python3 xml2csv.py
git clone https://github.com/tensorflow/models.git
sudo apt-get install protobuf-compiler python-pil python-lxml
cd models/
protoc object_detection/protos/*.proto --python_out=.
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
sudo python3 setup.py install
python3 generate-tfrecord.py --csv_input=data/train-labels.csv --output_path=data/train.record --image_dir=images/train/
python3 generate-tfrecord.py --csv_input=data/test-labels.csv --output_path=data/test.record --image_dir=images/test/
- Train on your PC, run this script.
- Train on a powerful machine, run colab notebook on Google Colab.