I have seen these web pages:
VEHICLE WARNING INDICATOR SYSTEM
Copilot — lane and front collision detection
Collision warning using Object Detection API by TensorFlow
And googled the android vehicle warning app which found some android app like:
S0 i like to test the Copilot colab codes via one android phone.
I have worked the android studio and have written some simple codes in it.(Like hello world and …)
But i asked here to have your suggestion for other alternative ways to do this, without needs to write more codes or …
I think it could be one android app with working by python language and have this codes :
The main model (almost 237M)
Run the Lane_detection.py file by this code ( the VideoCapture input mp4 file must captured by phone camera):
from lane_detection import LANE_DETECTION video_reader = cv2.VideoCapture("./videos/nice_road.mp4") fps = video_reader.get(cv2.CAP_PROP_FPS) nb_frames = int(video_reader.get(cv2.CAP_PROP_FRAME_COUNT)) frame_h = int(video_reader.get(cv2.CAP_PROP_FRAME_HEIGHT)) frame_w = int(video_reader.get(cv2.CAP_PROP_FRAME_WIDTH)) pers_frame_time = 398# seconds pers_frame = int(pers_frame_time *fps) video_reader.set(1,pers_frame) ret, image = video_reader.read() ld = LANE_DETECTION( image,fps, yellow_lower = np.uint8(( 20, 50, 110)), yellow_upper = np.uint8((35, 255, 255)), white_lower = np.uint8(( 0, 140, 0)), white_upper = np.uint8((255, 255, 100)), lum_factor = 110, lane_start=(0.2,0.5)) cv2_imshow(image) cv2_imshow(cv2.imread("./images/detection/perspective_lines.jpg")) cv2_imshow(cv2.imread("./images/detection/vanishing_point.jpg")) cv2_imshow(cv2.imread("./images/detection/edges.jpg")) cv2_imshow(cv2.imread("./images/detection/mask.jpg")) cv2_imshow(cv2.imread("./images/detection/masked_regions.jpg")) cv2_imshow(cv2.imread("./images/detection/lane_width.jpg"))
And maybe ebaling this code :
# self.image = self.camera.undistort(self.image)
In the frame.py file to have camera video instead of recorded YouTube video!
So i think it could be done by activating the functions of GitHub repo and so the question is :
- Is any GitHub project exist, for the android studio which would be
suitable to be used for camera picture processing like this usage?
- Or what fast and easy IDE or website Android app builder exit to have
access to Cell phone camera and capability to install and run python
code for building android app? ( fast and easy!)