This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Python script to split a labeled image dataset into Train, Validation, and Test folders. | |
# Author: Evan Juras, EJ Technology Consultants | |
# Date: 4/10/21 | |
# Randomly splits images to 80% train, 10% validation, and 10% test, and moves them to their respective folders. | |
# This script is intended to be used in the TFLite Object Detection Colab notebook here: | |
# https://colab.research.google.com/github/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi/blob/master/Train_TFLite2_Object_Detction_Model.ipynb | |
from pathlib import Path | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
val sportStats = listOf( | |
Summary(Sport.HIKE, 92), | |
Summary(Sport.RUN, 77), | |
Summary(Sport.TOURING_BICYCLE, 322), | |
Summary(Sport.E_TOURING_BICYCLE, 656) | |
) | |
val nonEBikeStats = sportStats.filter { it.sport != Sport.E_TOURING_BICYCLE } |