123456789101112131415161718192021222324252627 |
- import cv2
- import time
- import os
- import requests
- import pdb
- import asyncio
- import websockets
- import json
- import threading
- def car_classification(file_path):
- car_dict = {0:"tank",
- 1:"zhuangjc",
- 2:"jiefc",
- 3:"lvdc",
- 4:"lunsc",
- 5:"daodc"}
- file_format = ["txt","npy","xls","wav","json"]
- if file_path.split(".")[-1] in file_format:
- class_index = 0
- i = int(class_index)
- car_name = car_dict[i]
- status = True
- else:
- status = False
- return(car_name,status)
|