Predict corn.
- Zachary Balda
- Brandon Boynton
- Laurent Valle
.
+-- data
| +-- GOPRO165_01.jpg
| +-- GOPRO165_01.json
| +-- GOPRO165_02.jpg
| +-- GOPRO165_02.json
| ...
| +-- GOPRO165.MP4
| +-- GOPRO166_01.jpg
| +-- GOPRO166_01.json
| ...
| +-- GOPRO166_18.jpg
| +-- GOPRO166_18.json
| +-- GOPRO166.MP4
| ...
| ...
At path /keras-frcnn/
run:
python train_frcnn.py -o simple -p annotations.txt
Note: replace annotations.txt with actual annotations file
Place images in /keras-frcnn/test_images/
At path /keras-frcnn/
run:
python test_frcnn.py -p test_images
Outputs are saved to /keras-frcnn/results_images/
Note: Images must be .jpg format
The keras-frcnn model only accepts .jpg images. To convert MP4 videos to .jpg image sequences put all MP4 videos in /data/
and run the script we created:
python mp4_to_jpg.py
Set fps
in mp4_to_jpg.py
to choose number of frames per second (default 1
)
Annotations were done with labelme which saves a json file for each annotated image (at /data/
). The keras-frcnn model accepts a single .txt file which has a specific format. To generate a single .txt file from the json files, navigate to /data/
and run the script we created:
python json_to_txt.py
- pandas
- matplotlib
- tensorflow
- keras – 2.0.3
- numpy
- opencv-python
- sklearn
- h5py