semvec/pypi-packages huggingface dataset:
adbeventparser 0.10
Parses the output from 'uiautomator events' in real time and converts it to a list of lists / pandas DataFrame.
License: MIT
Keywords: uiautomator,events,record,adb,android,robo


# Parses the output from 'uiautomator events' in real time and converts it to a list of lists / pandas DataFrame.


## pip install adbeventparser


[![YT](https://i.ytimg.com/vi/KtO5h6XospU/maxresdefault.jpg)](https://www.youtube.com/watch?v=KtO5h6XospU)
[https://www.youtube.com/watch?v=KtO5h6XospU]()

```python
EventRecord class for recording events from an Android device using ADB.

This class provides a way to capture events from an Android device using ADB (Android Debug Bridge).
It can parse and display event data in both standard output and Pandas DataFrame formats.

Args:
	adb_path (str): The path to the ADB executable.
	device_serial (str): The serial number of the target Android device.
	print_output (bool, optional): Whether to print event data to the console. Default is True.
	print_output_pandas (bool, optional): Whether to print event data as Pandas DataFrames. Default is False.
	convert_to_pandas (bool, optional): Whether to convert event data to Pandas DataFrames. Default is False.
	parent1replacement (str, optional): A character used to replace temporarily opening square brackets '[' in event data. Default is "\x80".
	parent2replacement (str, optional): A character used to replace temporarily closing square brackets ']' in event data. Default is "\x81".

Methods:
	start_recording(**kwargs): Starts recording events from the device.

Attributes:
	stop: Stops the event recording if True
	results (list): A list of lists containing parsed event data.
	resultsdf (list): A list of Pandas DataFrames containing parsed event data. (if installed)

Example usage
	from adbeventparser import EventRecord
	sua = EventRecord(
		adb_path=r"C:\Android\android-sdk\platform-tools\adb.exe",
		device_serial="127.0.0.1:5555",
		print_output=True,
		print_output_pandas=False,
		convert_to_pandas=False,
		parent1replacement="\x80",
		parent2replacement="\x81",
	)
	sua.start_recording()
	# to stop
	# sua.stop=True
	# the data as a list of lists
	# sua.results
	# the data as pandas (if installed)
	# sua.resultsdf
```
face-projection 1.1.1
This projects main goal is to have a simple library to project information into faces while retaining the facial structure.
License: MIT
Requires Python: >=3.9

# face-projection

![Teaser](files/teaser.jpg)

Are you looking for a powerful, user-friendly tool to project information onto faces while maintaining their natural structure?
Look no further – `face-projection` is here to simplify how you visualize facial data.
The tool is open-source, easy to use, and written in Python, allowing you to easily integrate it into your existing workflow.
We try to keep the dependencies to a minimum so you can use them in your projects without worrying about compatibility issues.
However, we do not guarantee perfect anatomical correctness of the results but try to keep the distortion to a minimum.

All people shown here in the repository examples were generated with `StableDiffusion` (Prompt: `A professional portrait photo of a person directly looking <emotion> at the camera, white background, photoshop, Instagram`)

## Installation

The tool is available on [PyPI](https://pypi.org/project/face-projection/).

```bash
pip install face-projection
```

## Usage

The tool reduces the overhead of projecting information onto faces to a minimum.
Load the data and face, project it, and you are done.
You must only ensure the data is inside the canonical face model (see [electromyogram](https://github.com/cvjena/electromyogram) for an example).
The head pose can be arbitrary, but the face must be visible.

```python
import face_projection as fp
from PIL import Image

image_face = np.asarray(Image.open("face.jpg").convert("RGB"))
image_data = np.asarray(Image.open("data.jpg").convert("RGB"))

warper = fp.Warper()
warped = warper.apply(image_face, image_data, beta=0.2)
```

We automatically detect the face in the image, compute the landmarks based on the `Blaze` model, and warp the data onto it.
You can decide how much of the underlying face should be visible by adjusting the `beta` parameter.

In `examples/` you can find a more detailed example, which generates the teaser image.

## Future Work

We have many ideas for future work, but we are also happy to hear your suggestions.
The following todos are in no particular order but should give you an idea of what we are planning.

- [ ] The user can provide a mask to turn off certain parts of the projection
- [X] Different default warpings based on the six default Ekman emotions
- [ ] More face models
- [ ] Custom face models
- [ ] Upgrade to the newest mediapipe version to avoid MacOS build issues

## Citation

If you use our work, please cite our paper:

```bibtex
under publication, so coming soon :^)
```