Package: sightseer
State-of-the-art Computer Vision and Object Detection for TensorFlow.Made by Rishabh Anand •https://rish-16.github.iosightseerprovides state-of-the-art general-purpose architectures (YOLOv3, MaskRCNN, Fast/Faster RCNN, SSD...) for Computer Vision and Object Detection tasks with 30+ pretrained models written in TensorFlow 1.15.Installationsightseeris written in Python 3.5+ and TensorFlow 1.15.Ideally,sightseershould be installed in avirtual environments. If you're unfamiliar with Python virtual environments, check out thistutorialon getting started.Via PyPiTo usesightseer, you must first have TensorFlow installed. To do so, follow the instructions on theTensorFlow installation page.When your virtual environment is set up with TensorFlow, you can installsightseerusingpip:pipinstallsightseerModel Clients (as of now)YOLOv3Client(Darknet by Joseph Redmon)Facebook AI'sMask R-CNNwill be out in the v1.2.0 release. For more information on model release, check out theRoadmap.Components ofsightseerThe package comes with 4 major components that help with different parts of the object detection process all the way from preparing your raw data to getting predictions and displaying them.ComponentDescriptionSightseerObtains image data or video footageProcProvides image/frame-wise annotation and inter-format conversion toolsZooStores the wrappers over all state-of-the-art models and configsServeProvides deployment and model serving protocols and servicesIf not using custom datasets,SightseerandZooare the submodules majorly used for generic predictions from pre-trained models. When there is custom data involved, you can useProcto annotate your datasets and even convert them between XML/JSON/CSV/TFRecord formats.Serveis an experimental productionising submodule that helps deploy your models on cloud services like AWS and GCP. For more details on future tools and services, check out theRoadmap.FeaturesFootage or raw images can be rendered usingSightseerbefore being ingested into models or further preprocessed.1a. Loading imagesfromsightseerimportSightseerss=Sightseer()image=ss.load_image("path/to/image")# return numpy array representation of image1b. Loading videosfromsightseerimportSightseerss=Sightseer()frames=ss.load_vidsource("path/to/video")# returns nested array of framesSupport for video, webcam footage, and screen recording will be out in the coming v1.2.0 release.2. Using models fromsightseer.zooOnce installed, any model offered bysightseercan be accessed in less than 10 lines of code. For instance, the code to use the YOLOv3 (Darknet) model is as follows:fromsightseerimportSightseerfromsightseer.zooimportYOLOv3Clientyolo=YOLOv3Client()yolo.load_model()# downloads weights# loading image from local systemss=Sightseer()image=ss.load_image("./assets/road.jpg")# getting labels, confidence scores, and bounding box datapreds,pred_img=yolo.predict(image,return_img=True)ss.render_image(pred_img)To run the model on frames from a video, you can use theframewise_predictmethod:fromsightseerimportSightseerfromsightseer.zooimportYOLOv3Clientyolo=YOLOv3Client()yolo.load_model()# downloads weights# loading video from local systemss=Sightseer()frames=ss.load_vidsource("./assets/video.mp4")"""For best results, run on a GPU"""# getting labels, confidence scores, and bounding box datapreds,pred_frames=yolo.framewise_predict(frames)ss.render_footage(pred_frames)# plays the video and saves the footageThe module can even be repurposed into a Command-line Interface (CLI) app using theargparselibrary.ContributingSuggestions, improvements, and enhancements are always welcome! If you have any issues, please do raise one in the Issues section. If you have an improvement, do file an issue to discuss the suggestion before creating a PR.All ideas – no matter how outrageous – welcome!Before committing, please check theRoadmapto see if proposed features are already in-development or not.Note:Please commit all changes to thedevelopmentexperimentation branch instead ofmaster.LicenceApache Licencse 2.0